Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#26 2018-07-30 07:52:32

Jonas
Member
From: Frankfurt, Germany
Registered: 2016-06-06
Posts: 112
Website

Re: GBDK Bank Switching

To be honest, I don't know how exactly bank switching affects the pins. The code I mentioned in post #8 should in theory do the same as the bank switching instruction, so it's worth to give it a try and see what happens. "In theory" because with GBDK you never know what happens when you tamper with the hardware.

Just out of curiostiy: Is there any documentation or something for Rainer Ziegler's program? And do the 16 kb programs you can start from the menu also work on a standalone basis without the menu (when you just put them in bank 0)?

Last edited by Jonas (2018-07-30 08:02:53)

Offline

 

#27 2018-07-30 09:16:38

JS7777
Member
Registered: 2018-07-25
Posts: 17

Re: GBDK Bank Switching

The code I mentioned in post #8 should in theory do the same as the bank switching instruction, so it's worth to give it a try and see what happens. "In theory" because with GBDK you never know what happens when you tamper with the hardware.

I will try that.

Just out of curiostiy: Is there any documentation or something for Rainer Ziegler's program? And do the 16 kb programs you can start from the menu also work on a standalone basis without the menu (when you just put them in bank 0)?

Download link : https://scottbeebiwan.tk/mirrors/reiner … adplus.zip

Info : https://scottbeebiwan.tk/mirrors/reiner … enuprogram

startup.gb is the menu.

Ignore Readplus program, it's for some old homemade programmers.

Yes the tools works without the menu.

Offline

 

#28 2018-07-30 17:29:19

Jonas
Member
From: Frankfurt, Germany
Registered: 2016-06-06
Posts: 112
Website

Re: GBDK Bank Switching

JS7777 wrote:

Yes the tools works without the menu.

No, they don't.

The program or game must be assembled or compiled for the range 0x4000-0x7FFF and the values inside 0x0000-0x0150 (RET, RETI, Logo, Licensee, ROM size,..) must be at 0x4000-0x4150. So, write and test your cartridge at bank 0 and after testing add to all org statements 0x4000.

And now I do understand how it works. When you select a program from the menu, the menu simply switches to the respective bank and jumps to the starting point of the program (normally at address $0100 but in this case at $4100). For that purpose, however, the complete code of the program must be adjusted respectively. Otherwise, the first jump instruction would crash the program.

Offline

 

#29 2018-07-31 04:22:30

JS7777
Member
Registered: 2018-07-25
Posts: 17

Re: GBDK Bank Switching

Ah ok.

Thanks alot for your help and time.

Last edited by JS7777 (2018-07-31 04:22:42)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson