Two examples of setting up banks: Both work and this is unclear to me.
First example I have BANK 0 in SLOT 0 as .ORGA $ 0000 by default, another BANK 1 in SLOT 1 as .ORGA $ 4000 and the other BANK 2-7 as .ORGA $ 4000 (they are switchable from SLOT 1 $ 4000 so I guess it should be?)
Second example I have BANK 0 in SLOT 0 as .ORG $ 0000, another BANK 1 in SLOT 1 as also .ORG $ 0000 and the other BANKS also .ORG $ 0000 (when .ORGA was there, it wouldn't compile and a compile error popped up).
I don't know what is correct because both examples work ....
Should DEFAULTSLOT stay as 1 or 0?
#####################
BANK 0 ORGA $0000
OTHER BANKS (1-7) ORGA $4000:
#####################
Code: Select all
.GBHEADER
NAME "MBC1 DEMO"
CARTRIDGETYPE $01 ; MBC1 (00-ROMONLY,01-MBC1,$05-MBC2...)
RAMSIZE $00 ; no external RAM in the cartridge (00-no,01-2KB,02-8KB,03-32KB...)
COUNTRYCODE $01 ; outside Japan
NINTENDOLOGO
LICENSEECODENEW "SV"
ROMDMG ; DMG rom
.ENDGB
.MEMORYMAP
DEFAULTSLOT 1 ; 0 or 1 ??
SLOTSIZE $4000
SLOT 0 $0000
SLOT 1 $4000
.ENDME
.ROMBANKSIZE $4000
.ROMBANKS 8 ; 128KB
;--------------BANKS:
.BANK 0 SLOT 0 ; SLOT 0 default BANK 0 (fixed slot)
.ORGA $0000
.BANK 1 SLOT 1 ; SLOT 1 default BANK 1 (swappable slot)
.ORGA $4000
.BANK 2 ; banks 2-7 switchable in SLOT 1
.ORGA $4000
.BANK 3
.ORGA $4000
.BANK 4
.ORGA $4000
.BANK 5
.ORGA $4000
.BANK 6
.ORGA $4000
.BANK 7
.ORGA $4000
ALL BANKS ORG $0000
#####################
Code: Select all
.GBHEADER
NAME "MBC1 DEMO"
CARTRIDGETYPE $01 ; MBC1 (00-ROMONLY,01-MBC1,$05-MBC2...)
RAMSIZE $00 ; no external RAM in the cartridge (00-no,01-2KB,02-8KB,03-32KB...)
COUNTRYCODE $01 ; outside Japan
NINTENDOLOGO
LICENSEECODENEW "SV"
ROMDMG ; DMG rom
.ENDGB
.MEMORYMAP
DEFAULTSLOT 1 ; 0 or 1?
SLOTSIZE $4000
SLOT 0 $0000
SLOT 1 $4000
.ENDME
.ROMBANKSIZE $4000
.ROMBANKS 8 ; 128KB
;--------------BANKS:
.BANK 0 SLOT 0
.ORG $0000
.BANK 1 SLOT 1
.ORG $0000
.BANK 2
.ORG $0000
.BANK 3
.ORG $0000
.BANK 4
.ORG $0000
.BANK 5
.ORG $0000
.BANK 6
.ORG $0000
.BANK 7
.ORG $0000