Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-04-12 22:19:52

ReadCutting-T
Member
Registered: 2012-04-12
Post 2/20

Compiling problems

I have just gone onto the "ASM SCHOOL" website and I am having problems compiling my "Hello World" rom. I have 'HELLO.asm' , 'link1', 'RGBFIX.exe', 'RGBASM.exe', 'XLINK.exe' and 'Make.bat in my folder.
However, when I run 'make.bat', I get 'testmap.txt' and 'test.sym' but no 'test.gbc'. Can anyone help? For reference here are the contents of:

make.bat

rgbasm -ohello.obj hello.asm

xlink -mtest.map -ntest.sym link1

rgbfix -v -o test.gbc

ren test.map testmap.txt

link1

[Objects]
hello.obj

[Output]
test.gbc

HELLO.asm

;****************************************************************************************************************************************************
;*    "HELLO.asm- Hello World Source Code
;*
;****************************************************************************************************************************************************
;*
;*
;****************************************************************************************************************************************************

;****************************************************************************************************************************************************
;*    Includes
;****************************************************************************************************************************************************
    ; system includes
    INCLUDE    "Hardware.inc"

    ; project includes
    INCLUDE    "blankasm.inc"

    
;****************************************************************************************************************************************************
;*    user data (constants)
;****************************************************************************************************************************************************


;****************************************************************************************************************************************************
;*    equates
;****************************************************************************************************************************************************


;****************************************************************************************************************************************************
;*    cartridge header
;****************************************************************************************************************************************************

    SECTION    "Org $00",HOME[$00]
RST_00:    
    jp    $100

    SECTION    "Org $08",HOME[$08]
RST_08:    
    jp    $100

    SECTION    "Org $10",HOME[$10]
RST_10:
    jp    $100

    SECTION    "Org $18",HOME[$18]
RST_18:
    jp    $100

    SECTION    "Org $20",HOME[$20]
RST_20:
    jp    $100

    SECTION    "Org $28",HOME[$28]
RST_28:
    jp    $100

    SECTION    "Org $30",HOME[$30]
RST_30:
    jp    $100

    SECTION    "Org $38",HOME[$38]
RST_38:
    jp    $100

    SECTION    "V-Blank IRQ Vector",HOME[$40]
VBL_VECT:
    reti
    
    SECTION    "LCD IRQ Vector",HOME[$48]
LCD_VECT:
    reti

    SECTION    "Timer IRQ Vector",HOME[$50]
TIMER_VECT:
    reti

    SECTION    "Serial IRQ Vector",HOME[$58]
SERIAL_VECT:
    reti

    SECTION    "Joypad IRQ Vector",HOME[$60]
JOYPAD_VECT:
    reti
    
    SECTION    "Start",HOME[$100]
    nop
    jp    Start

    ; $0104-$0133 (Nintendo logo - do _not_ modify the logo data here or the GB will not run the program)
    DB    $CE,$ED,$66,$66,$CC,$0D,$00,$0B,$03,$73,$00,$83,$00,$0C,$00,$0D
    DB    $00,$08,$11,$1F,$88,$89,$00,$0E,$DC,$CC,$6E,$E6,$DD,$DD,$D9,$99
    DB    $BB,$BB,$67,$63,$6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E

    ; $0134-$013E (Game title - up to 11 upper case ASCII characters; pad with $00)
    DB    "HELLO WORLD"
        ;0123456789A

    ; $013F-$0142 (Product code - 4 ASCII characters, assigned by Nintendo, just leave blank)
    DB    "    "
        ;0123

    ; $0143 (Color GameBoy compatibility code)
    DB    $00    ; $00 - DMG 
            ; $80 - DMG/GBC
            ; $C0 - GBC Only cartridge

    ; $0144 (High-nibble of license code - normally $00 if $014B != $33)
    DB    $00

    ; $0145 (Low-nibble of license code - normally $00 if $014B != $33)
    DB    $00

    ; $0146 (GameBoy/Super GameBoy indicator)
    DB    $00    ; $00 - GameBoy

    ; $0147 (Cartridge type - all Color GameBoy cartridges are at least $19)
    DB    $00    ; $00 - ROM Only

    ; $0148 (ROM size)
    DB    $00    ; $00 - 256Kbit = 32Kbyte = 2 banks

    ; $0149 (RAM size)
    DB    $00    ; $00 - None

    ; $014A (Destination code)
    DB    $00    ; $01 - All others
            ; $00 - Japan

    ; $014B (Licensee code - this _must_ be $33)
    DB    $33    ; $33 - Check $0144/$0145 for Licensee code.

    ; $014C (Mask ROM version - handled by RGBFIX)
    DB    $00

    ; $014D (Complement check - handled by RGBFIX)
    DB    $00

    ; $014E-$014F (Cartridge checksum - handled by RGBFIX)
    DW    $00


;****************************************************************************************************************************************************
;*    Program Start
;****************************************************************************************************************************************************

    SECTION "Program Start",HOME[$0150]
Start::
    di                    ; disable interupts
    ld        sp,$FFFE    ; set the stack to $FFFE
    call    WAIT_VBLANK    ; wait for v-blank
    
    ld    a,0                ;
    ldh    [rLCDC],a        ; turn off LCD
    
    call CLEAR_MAP        ; clear the BG map
    call LOAD_TILES        ; load up our tiles
    call LOAD_MAP        ; load up our map
    
    ld    a,%11100100        ; load a normal palette
    ldh    [rBGP],a         ; load the palette
    
    ld    a,%10010001        ; =$91
    ldh    [rLCdC],a         ; turn on the LCD, BG, etc

Loop::
    halt
    nop
    jp    Loop
    


;*** End Of File ***

Once again, if anyone could tell me where the problem lies I would be very gratefull.

Thanks!

Offline

#2 2012-04-14 14:14:03

ReadCutting-T
Member
Registered: 2012-04-12
Post 16/20

Re: Compiling problems

Here is what the command prompt window shows:

C:\Documents and Settings\Tom\Desktop\Rom Hacking\ASM\Hellow World>rgbasm -o hel
lo.o hello.asm
Output filename hello.o
Assembling hello.asm
Pass 1...
Could not open file 'Hardware.inc' : No such file or directory
*ERROR* hello.asm(13) :
        File not found
Could not open file 'blankasm.inc' : No such file or directory
*ERROR* hello.asm(16) :
        File not found
Assembly aborted in pass 1 (2 errors)!

C:\Documents and Settings\Tom\Desktop\Rom Hacking\ASM\Hellow World>rgblink -o he
llo.gb hello.o link1
Unable to open object 'hello.o': No such file or directory

C:\Documents and Settings\Tom\Desktop\Rom Hacking\ASM\Hellow World>rgbfix -v -p
0 hello.gb
Error opening file hello.gb:
No such file or directory

C:\Documents and Settings\Tom\Desktop\Rom Hacking\ASM\Hellow World>PAUSE
Press any key to continue . . .

I'll see if I can fix that myself..

Offline

#3 2012-04-14 15:15:35

ReadCutting-T
Member
Registered: 2012-04-12
Post 17/20

Re: Compiling problems

I've (sorta) sorted it out now!

Offline

Board footer

Powered by FluxBB