News for hackers. Stuff that matters.
Re:Game Boy / Color Architecture by monocasa on Tuesday December 26, 2023 @05:45PM (#38776911)
And to be fair, I don't think there was anything stopping a DMG game from reaching 4MB. The pak has the same aperture size of basically 32k either way, and the bank switching for either 4MB or 1MB is on the cart itself.
Re:Game Boy / Color Architecture by MBCook on Tuesday December 26, 2023 @07:05PM (#38777476)
Right. I don’t think Nintendo had a mapper to do it at the time. I doubt third parties did.

But if you wanted to let a DMG address 2 gigs of memory 32k at a time you could do it.

It’s a little hard to imagine a game needing > 1MB if it’s just B&W. But I suppose you could put a ton of text in or do some kind of demo-scene style ‘video’ playback. But no one would have for cost reasons back then.

Re:Game Boy / Color Architecture by tadfisher on Tuesday December 26, 2023 @08:15PM (#38777965)
I know of the GBC port of Cannon Fodder, which was 32Mb (4MiB) and had an FMV intro. https://youtu.be/DkpQrnKcgp4
Re:Game Boy / Color Architecture by duskwuff on Tuesday December 26, 2023 @07:19PM (#38777573)
> But no one would have for cost reasons back then.

Not on the GBC, but GBA had a number of video cartridges, including several full-length movies:

https://en.wikipedia.org/wiki/Game_Boy_Advance_Video

Re:Game Boy / Color Architecture by MBCook on Tuesday December 26, 2023 @08:21PM (#38778022)
I never used one, but I remember being really surprised the first time I saw one of those in a store.
Re:Game Boy / Color Architecture by itsmartapuntocm on Tuesday December 26, 2023 @09:05PM (#38778293)
I had a few. The quality was about what you’d expect for a video on a game boy cartridge.
Re:Game Boy / Color Architecture by Dylan16807 on Wednesday December 27, 2023 @01:33AM (#38779627)
A single fullscreen image for game boy is almost 6KB. If you were making something pretty you could have several images per level and go over a megabyte without much effort.
Re:Game Boy / Color Architecture by MBCook on Wednesday December 27, 2023 @04:53PM (#38787228)
You can’t individually address every pixel, you have to use tiles. So unless you’re using a mapper chip that could swap them out on a per scan line basis you have much stricter limits.
Re:Game Boy / Color Architecture by Dylan16807 on Wednesday December 27, 2023 @09:51PM (#38789450)
Yes you have to use tiles, but I'm not sure what you mean by "much stricter limits". The game boy can load 384 tiles at once, which is enough to cover the entire screen without duplicates.

You can't freely mix the first 128 with the last 128 but that's easy to deal with.

Re:Game Boy / Color Architecture by lynguist on Wednesday December 27, 2023 @07:34AM (#38781371)
That would be levels and levels of indirection because 32K can be loaded at once and to address 2G in 32K chunks you need over 32K just for the address of the block. And then you need a part of the code loaded that actually does that swapping. You would need at least 3 levels for every memory address. Each 32K chunk would have its own address that would be loaded from two 32K chunks, that’s how giant its address is. And then that block would be loaded in.

I think that it would be literally impossible to have random access memory of 2G.

Re:Game Boy / Color Architecture by torgoguys on Wednesday December 27, 2023 @08:42PM (#38789007)
I'm not sure what you mean. 4gb is 31-bits (<4 bytes) of address space. If each page had 32K of address space (15 bits), that would require 64K different pages, which just requires the remaining 16 bits of the 31 bits to identify it. So the block address is just 2 bytes long, not 32K bytes.

For these paged systems, you typically swap in the the page you're interested (iirc, gameboy did it by writing the page number to particular memory addresses) and then work with it for a while, and often execute code directly contained in it, which will eventually lead to loading the next page you need when you need it.

Re:Game Boy / Color Architecture by Dwedit on Wednesday December 27, 2023 @04:43PM (#38787120)
None of the standard mappers used in Game Boy/Game Boy Color games provide 32K switchable banks. They all provide a fixed 16K bank at the beginning, and a switchable 16K bank afterwards. If there are 8 bits of bank selection, the maximum cartridge size becomes 4MB, but some mappers allow more than 8 bits to select a bank.

One of the common mappers even enforces that you may not pick bank 0 for the switchable bank, picking 1 instead.

Mappers found in bootleg multicarts do allow you to change the base address and size of the game, which will move the fixed bank.