Ok, so im sure that this has been a topic of discussion so far but internet searches have yielded no results and i couldn't find a forum that exactly helped me either. I am trying to assemble an nes program with wla-6502 and even though it outputs a .nes file it seems to be invalid as my emulator says there is a load error. this is the code i am trying to assemble. it was taken directly from a topic on this site about using wla-6502 w/ nes:
i assembled it by typing:
wla-6502 test.asm test.obj
wlalink test.link test.nes
i have made the .link file and everything assembles correctly, but my emulator which is fceux will not load this program. Please help! I dont wanna use nesasm but it seems to be the only thing i can get to work!!! Is there something missing or something that needs done to the code to make this work?
Code:
.EMPTYFILL $FF
.MEMORYMAP
SLOTSIZE $2000
DEFAULTSLOT 0
SLOT 0 $8000
SLOT 1 $A000
SLOT 2 $C000
SLOT 3 $E000
SLOT 4 $2000
.ENDME
.ROMBANKMAP
BANKSTOTAL 4
BANKSIZE $2000
BANKS 4
.ENDRO
.RAMSECTION "Stuff" SLOT 4
PPU_SET1: DB
PPU_SET2: DB
PPU_READ: DB
.ENDS
.BANK 0 SLOT 0
.ORGA $8000
.BANK 1 SLOT 1
.ORGA $A000
.BANK 2 SLOT 2
.ORGA $C000
.BANK 3 SLOT 3
.ORGA $E000
main:
lda PPU_READ.w
jmp main
.ORGA $FFFA
.SECTION "Vectors" FORCE
.DW main, main, main
.ENDS
.MEMORYMAP
SLOTSIZE $2000
DEFAULTSLOT 0
SLOT 0 $8000
SLOT 1 $A000
SLOT 2 $C000
SLOT 3 $E000
SLOT 4 $2000
.ENDME
.ROMBANKMAP
BANKSTOTAL 4
BANKSIZE $2000
BANKS 4
.ENDRO
.RAMSECTION "Stuff" SLOT 4
PPU_SET1: DB
PPU_SET2: DB
PPU_READ: DB
.ENDS
.BANK 0 SLOT 0
.ORGA $8000
.BANK 1 SLOT 1
.ORGA $A000
.BANK 2 SLOT 2
.ORGA $C000
.BANK 3 SLOT 3
.ORGA $E000
main:
lda PPU_READ.w
jmp main
.ORGA $FFFA
.SECTION "Vectors" FORCE
.DW main, main, main
.ENDS
i assembled it by typing:
wla-6502 test.asm test.obj
wlalink test.link test.nes
i have made the .link file and everything assembles correctly, but my emulator which is fceux will not load this program. Please help! I dont wanna use nesasm but it seems to be the only thing i can get to work!!! Is there something missing or something that needs done to the code to make this work?