Beautiful. The motivation and execution. Everything about this is why I come to HN.
Related... for a native GB/DMG/Z80 take ... the original first person shooter for the Game Boy was Faceball 2000. (1991) The studio was full of coders who loved and admired Wolf 3D and everything that followed. By day, we were stuck coding variations of Z80 and 6502 assembly. I did the Sega Game Gear port. It was not good.
Really cool project! Since the hardware of the cartridge is fully customizable, wouldn't it be possible to port games that would normally not be playable on the GBC? You could add advanced hardware, that is nowadays so small that it fits on the cartridge, and the GBC would act more or less like a renderer of the pre-calculated output of those chips.
Probably yes, the NES is "easier" in this regard since char-rom is read from cart (so a cart only needs to provide the bits in correct order), the GB(C)'s have video-ram that contains all parts so you need to transfer it over. Don't exactly remember but iirc classic GB was a tad too slow for this, but GBC has a DMA that might be fast enough. (I've developed on classic GB mostly so don't know the characteristics of GBC mode).
I played a bit with original gameboy too. I was very surprised when, iirc, the cpu is not even fast enough to clear the screen in one vertical blank, or even in one frame! It takes like three to fully clear the map.
Yeah, you really need to structure your code around working with the tilemap system.
I did a small racing prototype with both vertical and horizontal scrolling and segmented my updates to 4x4 blocks of tiles per-frame (160x144 resolution so 20x18 of 32x32 tiles is visible at any point in time, so stippled updating 4x4 blocks outside of view is within the budget together with updating some of the tiles each frame)
You need to do mid-frame tile updates just to show a full bitmap frame. There’s 360 8x8 tiles on the screen, but the tile indices are 8 bit (you can only reference 256 tiles). You can store only 384 tiles in VRAM - a bit more than a full screen. So the mid-screen update is to go from one tile dictionary to the other, so you can access 360 tiles in total.
You can update 1 tile per scan line (during hblank), so 154 tiles per frame (including 10 vblank scanlines). So you need 2.5 frames to replace all tiles.
If you are really smart about updates, you can “race the beam”, basically start updating tiles just as the frame starts rendering, just behind the active scan line. Then you can update maybe 280 tiles before the active scan line of the next frame catches up with you.
I don't think it's widely known (only found and documented somewhat recently) that there is a way for cartridges to directly drive the Game Boy Color LCD, bypassing the CPU/PPU (PGB Modes). At that point though it becomes even less of a Game Boy game than what the Wolfenstein and other carts are doing.
Also related: "There oughta be GTA5 for the Game Boy" about a Wifi cartridge that can stream video (gameplay, etc) directly to the GB screen.
https://there.oughta.be/gta5-for-the-game-boy
Essentially, yes. You could even go further and make it like a 32X style add-on with a pass-through connector if you wanted to really save money. I guess one of these carts with a micro SD card socket on it would be the ideal.
The biggest limit with these older consoles is the VDP/PPU. You can't just render directly to the screen because a framebuffer doesn't exist, instead you have to render to tile and then have the pixel pipeline render those sequentially to screen. So you're fundamentally limited by how fast that can update.
Systems with DMA like the Genesis could just act as a dumb framebuffer to whatever the cartridge decides to dump down the address lines. The Gameboy is a little more difficult, but could also theoretically do it as well if you decide to dump the FPS a bit and/or lower the resolution, and buffer the frames. Which is essentially what the faceball2000 devs had to deal with. And you can speed that up a bit by "racing the beam" (rendering the next frame to a previous tile as the next tile is blitting).
Glad to see some love for Wolf3d. It was an important step in the development of the FPS genre, but has always been overshadowed by Doom. As someone who could not play Doom on my 386, Wolfenstein I have many fond memories of this classic. I'm sure I'm not alone!
It probably depends on how young one was, I was young enough to play it for a year or two before Doom appeared (also Doom was kind-of sluggish on my machine at the time).
Fond memories. I remember going to the local YMCA (sub-2000) and going from DOS terminal to DOS terminal typing in (IIRC) `exec wolf3d.exe` and finding one of the few PC's that had it loaded to play it.
I had a similar experience with Quake when it first came out... it felt more like a slideshow on my AMD 5x86 @133mhz w/ 64mb ram and large cache module. My computer was entirely lopsided for games, I got the AMD a few months before a crazy deal on the ram and cache module for it, so I maxed it out. I will say it tore through business apps with OS/2 and later NT4 ran like a champ on that little box.
I couldn't afford the jump to Pentium at the time. I had it for about 4 years or so, until I bumped up to an overclocked Duron at 1ghz around 2000-2001 or so.
In PGB mode 2 the CPU is still able to run (within a limited address range) and can use register FF75 "PGBIO" for limited input and output on some cartridge pins (and/or the link port for IO).
This is incredibly cool, but would appear to be frustrating to play as it doesn't seem to support strafing, I imagine due to the minimal amount of available buttons.
Most of the game runs on an external Cortex-M0 chip in the cart. GBC is incapable of this much computation per frame. This solution is elegant and not unlike what some of the fancier NES games did. Overall, very well done.
The SNES does something similar with the Super Game Boy, and it is surprising to me that the SNES does not have the memory bandwidth to run Game Boy Color games at full speed using this technique. Super FX games worked similarly and never ran at full speed, albeit they had larger dimensions.
But somehow the Game Boy Color itself can transfer a full screen's worth of tiles and their color palettes at what looks like 60 FPS. Quite impressive, really.
Some SNES games offloaded varying degrees of computation to on-cart chips, but I don't believe any NES games did. There was a Hellraiser game in development for the NES that was supposed to ship as a Z80-powered "super cartridge" but it was canceled.
The GBC had astounding games such as the Cannon Fodder port (almost like a 1:1 port from the Amiga /DOS version but with 2 soldiers instead of 3), Alone in the Dark, Scooby Doo...
Also, on faux 3D gaming, one of the best games it's Supercross Freestyle. You should have seen it in action. Yes, Top Gear Pocket 2 overall had better variation but the ingame scaling of the cross racing one was incredible https://en.wikipedia.org/wiki/Supercross_Freestyle
Cruisin Exotica had better graphics/art maybe but that's it, Supercross did more credible jumps and perspective tricks under an 8 bit console.
On 16 bit racers, probably the patched Genesis ROMs for Road Rash I-III would be one of the best faux 3D games ever before 32 bit consoles and computers rendered (no pun intended) them obsolete. They add a far better framerate while being totally compatible for consoles. You can get thrown from your bike and "explore" the environment on your own with nice scaling tricks.
Lotus 3 for the Amiga achieved believable perspective based techniques too to simulate a 3D cliff in a pure 2D game, at leat racing aside. These were great too.
Now, once Road Rash 3D hit the PSX (and Ridge Racer among Daytona Usa, altough Daytona's render distance sucked and RR hided it far better) the 2D games' days were numbered. With Road Rash 3D you could totally free roam around on your own outside the circuit, go anywhere, do 360 degree turns and be sure that any town/road you would be seeing further in the horizon would be a rideable path. It was, and that was mind blowing, compared to the static screens from 2D games.
Imagine a pre-Street View world where video games would be almost the sole way (among movies and series OFC) to experience yourself the rest of the world, or America if you were an European. No, multimedia CD's were expensive and your parent's wouldn't buy you a "Virtual Tour CD" from Paris or the like, it had no actual use except if it were something like Italy or France showed from a touristical/historical basis. These first videogames gave me a roaming experience until GTA III was a thing. Later, yes, Street View killed it because, you know, you got the real thing in your computer, but the magic was lost a little.
Beautiful. The motivation and execution. Everything about this is why I come to HN.
Related... for a native GB/DMG/Z80 take ... the original first person shooter for the Game Boy was Faceball 2000. (1991) The studio was full of coders who loved and admired Wolf 3D and everything that followed. By day, we were stuck coding variations of Z80 and 6502 assembly. I did the Sega Game Gear port. It was not good.
Faceball 2000 also the only 16-player GB link game
https://www.youtube.com/watch?v=y2AG-gAuS-U
Really cool project! Since the hardware of the cartridge is fully customizable, wouldn't it be possible to port games that would normally not be playable on the GBC? You could add advanced hardware, that is nowadays so small that it fits on the cartridge, and the GBC would act more or less like a renderer of the pre-calculated output of those chips.
Probably yes, the NES is "easier" in this regard since char-rom is read from cart (so a cart only needs to provide the bits in correct order), the GB(C)'s have video-ram that contains all parts so you need to transfer it over. Don't exactly remember but iirc classic GB was a tad too slow for this, but GBC has a DMA that might be fast enough. (I've developed on classic GB mostly so don't know the characteristics of GBC mode).
I played a bit with original gameboy too. I was very surprised when, iirc, the cpu is not even fast enough to clear the screen in one vertical blank, or even in one frame! It takes like three to fully clear the map.
Yeah, you really need to structure your code around working with the tilemap system.
I did a small racing prototype with both vertical and horizontal scrolling and segmented my updates to 4x4 blocks of tiles per-frame (160x144 resolution so 20x18 of 32x32 tiles is visible at any point in time, so stippled updating 4x4 blocks outside of view is within the budget together with updating some of the tiles each frame)
This is false. You can do it in 1. It just involves mid-frame tile switching IIRC or using characters / sprites to fill in the rest.
You need to do mid-frame tile updates just to show a full bitmap frame. There’s 360 8x8 tiles on the screen, but the tile indices are 8 bit (you can only reference 256 tiles). You can store only 384 tiles in VRAM - a bit more than a full screen. So the mid-screen update is to go from one tile dictionary to the other, so you can access 360 tiles in total.
You can update 1 tile per scan line (during hblank), so 154 tiles per frame (including 10 vblank scanlines). So you need 2.5 frames to replace all tiles.
If you are really smart about updates, you can “race the beam”, basically start updating tiles just as the frame starts rendering, just behind the active scan line. Then you can update maybe 280 tiles before the active scan line of the next frame catches up with you.
I don't think it's widely known (only found and documented somewhat recently) that there is a way for cartridges to directly drive the Game Boy Color LCD, bypassing the CPU/PPU (PGB Modes). At that point though it becomes even less of a Game Boy game than what the Wolfenstein and other carts are doing.
https://gbdev.gg8.se/wiki/articles/Gameboy_and_Gameboy_Color...
Also related: "There oughta be GTA5 for the Game Boy" about a Wifi cartridge that can stream video (gameplay, etc) directly to the GB screen. https://there.oughta.be/gta5-for-the-game-boy
GBC had GTA2 port which wasn't half bad but the Driver port was smoother and with better mechanics.
Essentially, yes. You could even go further and make it like a 32X style add-on with a pass-through connector if you wanted to really save money. I guess one of these carts with a micro SD card socket on it would be the ideal.
You may enjoy this Tom7 video about doing that with the NES:
https://www.youtube.com/watch?v=ar9WRwCiSr0
The biggest limit with these older consoles is the VDP/PPU. You can't just render directly to the screen because a framebuffer doesn't exist, instead you have to render to tile and then have the pixel pipeline render those sequentially to screen. So you're fundamentally limited by how fast that can update.
Systems with DMA like the Genesis could just act as a dumb framebuffer to whatever the cartridge decides to dump down the address lines. The Gameboy is a little more difficult, but could also theoretically do it as well if you decide to dump the FPS a bit and/or lower the resolution, and buffer the frames. Which is essentially what the faceball2000 devs had to deal with. And you can speed that up a bit by "racing the beam" (rendering the next frame to a previous tile as the next tile is blitting).
Glad to see some love for Wolf3d. It was an important step in the development of the FPS genre, but has always been overshadowed by Doom. As someone who could not play Doom on my 386, Wolfenstein I have many fond memories of this classic. I'm sure I'm not alone!
It probably depends on how young one was, I was young enough to play it for a year or two before Doom appeared (also Doom was kind-of sluggish on my machine at the time).
Fond memories. I remember going to the local YMCA (sub-2000) and going from DOS terminal to DOS terminal typing in (IIRC) `exec wolf3d.exe` and finding one of the few PC's that had it loaded to play it.
I had a similar experience with Quake when it first came out... it felt more like a slideshow on my AMD 5x86 @133mhz w/ 64mb ram and large cache module. My computer was entirely lopsided for games, I got the AMD a few months before a crazy deal on the ram and cache module for it, so I maxed it out. I will say it tore through business apps with OS/2 and later NT4 ran like a champ on that little box.
I couldn't afford the jump to Pentium at the time. I had it for about 4 years or so, until I bumped up to an overclocked Duron at 1ghz around 2000-2001 or so.
Well you could have played Duke Nukem 3D which has semi-3D environments based on real life places.
Game Boy Color has a secret video mode where you can directly drive the LCD from the cartridge slot.
CPU completely halts, so you can't use the joypad or sound anymore.
https://gbdev.gg8.se/wiki/articles/Gameboy_and_Gameboy_Color...
That CPU halting only applies for PGB mode 1.
In PGB mode 2 the CPU is still able to run (within a limited address range) and can use register FF75 "PGBIO" for limited input and output on some cartridge pins (and/or the link port for IO).
This is incredibly cool, but would appear to be frustrating to play as it doesn't seem to support strafing, I imagine due to the minimal amount of available buttons.
Most of the game runs on an external Cortex-M0 chip in the cart. GBC is incapable of this much computation per frame. This solution is elegant and not unlike what some of the fancier NES games did. Overall, very well done.
The SNES does something similar with the Super Game Boy, and it is surprising to me that the SNES does not have the memory bandwidth to run Game Boy Color games at full speed using this technique. Super FX games worked similarly and never ran at full speed, albeit they had larger dimensions.
But somehow the Game Boy Color itself can transfer a full screen's worth of tiles and their color palettes at what looks like 60 FPS. Quite impressive, really.
30fps as per TFA for fullscreen xfer
but GB's screen is shitty enough that 30FPS is aplenty
Some SNES games offloaded varying degrees of computation to on-cart chips, but I don't believe any NES games did. There was a Hellraiser game in development for the NES that was supposed to ship as a Z80-powered "super cartridge" but it was canceled.
Really hope this makes it to something like Modretro/Chromatic games collection. The box art looks fantastic, love seeing resurgance of Gameboy color.
The GBC had astounding games such as the Cannon Fodder port (almost like a 1:1 port from the Amiga /DOS version but with 2 soldiers instead of 3), Alone in the Dark, Scooby Doo...
Also, on faux 3D gaming, one of the best games it's Supercross Freestyle. You should have seen it in action. Yes, Top Gear Pocket 2 overall had better variation but the ingame scaling of the cross racing one was incredible https://en.wikipedia.org/wiki/Supercross_Freestyle
Cruisin Exotica had better graphics/art maybe but that's it, Supercross did more credible jumps and perspective tricks under an 8 bit console.
On 16 bit racers, probably the patched Genesis ROMs for Road Rash I-III would be one of the best faux 3D games ever before 32 bit consoles and computers rendered (no pun intended) them obsolete. They add a far better framerate while being totally compatible for consoles. You can get thrown from your bike and "explore" the environment on your own with nice scaling tricks.
Lotus 3 for the Amiga achieved believable perspective based techniques too to simulate a 3D cliff in a pure 2D game, at leat racing aside. These were great too.
Now, once Road Rash 3D hit the PSX (and Ridge Racer among Daytona Usa, altough Daytona's render distance sucked and RR hided it far better) the 2D games' days were numbered. With Road Rash 3D you could totally free roam around on your own outside the circuit, go anywhere, do 360 degree turns and be sure that any town/road you would be seeing further in the horizon would be a rideable path. It was, and that was mind blowing, compared to the static screens from 2D games.
Imagine a pre-Street View world where video games would be almost the sole way (among movies and series OFC) to experience yourself the rest of the world, or America if you were an European. No, multimedia CD's were expensive and your parent's wouldn't buy you a "Virtual Tour CD" from Paris or the like, it had no actual use except if it were something like Italy or France showed from a touristical/historical basis. These first videogames gave me a roaming experience until GTA III was a thing. Later, yes, Street View killed it because, you know, you got the real thing in your computer, but the magic was lost a little.
Does it run Doom?
Related from back in the day, a Doom style (BSP) engine for the z80 calculators: https://www.benryves.com/journal/tags/Nostromo/all