Video: Lesson P29 - Hardware detection and Bank Switching on the Sega Mastersystem/GameGear
Video: Lesson P29 - Hardware detection and Bank Switching on the Sega Mastersystem/GameGear
www.chibiakumas.com/z80/platform3.php#LessonP29
It's time to move onto the consoles, lets see how we can detect the platform we're on, and how to use extra rom banking on those systems
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Re: Video: Lesson P29 - Hardware detection and Bank Switching on the Sega Mastersystem/GameGear
About the video I see you have 8 of 16KB banks or a 128KB cartridge. So org 49152 with 49152=16384*3 would be used to code the start address before the 16KB incbin data block or bank of the 4th 16KB bank in a 128KB master system cartridge and this works.
It basically looks like this in code
org 0000
;;some code
org 49152
incbin "16KB data block"
But how to use org 81920 with 81920=16384*5 for the start address before the 16KB incbin data block of the 5th 16KB bank because 81920 more than a 16bit number so what is the right way to express 81920 used to insert the 16KB incbin for the 5th bank into the program?
It basically looks like this in code
org 0000
;;some code
org 49152
incbin "16KB data block"
But how to use org 81920 with 81920=16384*5 for the start address before the 16KB incbin data block of the 5th 16KB bank because 81920 more than a 16bit number so what is the right way to express 81920 used to insert the 16KB incbin for the 5th bank into the program?
Re: Video: Lesson P29 - Hardware detection and Bank Switching on the Sega Mastersystem/GameGear
I don't think you'll be able to specify an org statement with a base over &FFFF
You could try an Align statement to align to the next 16k boundary (align 14 should do it),
The other alternative would be to split the project into multiple built binary files, and join the files using the binary copy commands to combine them into the final cartridge.
You could try an Align statement to align to the next 16k boundary (align 14 should do it),
The other alternative would be to split the project into multiple built binary files, and join the files using the binary copy commands to combine them into the final cartridge.
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809