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.
So I've been experimenting with programs larger than 32k. I got a 64k program. I even put a font in bank 3 and have it be read in bank 0. But why is "gotoxy" not allowed in a 64k game when it *is* allowed in a 32k game? Is there another way to place text on the screen where you want it? I'm using C.
Offline
seems that you are switching bank3 into the place where your gotoxy() is landed. so, you either have a code that you want to call, or data that is used with that call, not both at once as required. i suggest you not to use stdio at all, it is too large. also monitor the layout of objects inside your rom, like on picture below. we see 64k rom and usage of 4 banks here. code from bank0 never overrun into bank1 - the problem that you describe.
Offline
you see 64K of the rom image here. the first block is bank0, it is mapped to the area 0..0x4000. the second block is bank1, it is mapped from 0x4000. banks 2 and 3 below are not mapped into address space at all. they may be switched from the address 0x4000 instead.
so, if your code in bank0 overgrows the boundary of 0x4000, that part, that appear in bank1 is switched away when you switch on bank3 or any other. that is dangerous, because you can not say, what code becomes broken. in your case it is gotoxy(), but that might be any.
that picture is made using the utility written by PinoBatch and may be found here: https://github.com/pinobatch/240p-test- … omusage.py
Offline
your rom might look similar with this one:
[img]https://b.radikal.ru/b20/2008/the Big N/7d48030b87ce.png[/img]
you can see here, that code in bank0 overgrow the 0x4000 boundary, and switching bank 2 or 3 make it unreachable. you should do that carefully and always restore bank1.
Last edited by toxa (2020-08-08 15:26:11)
Offline