Wolfenstein 3D for Gameboy Color on custom cartridge (2016) (happydaze.se)
143 points by ksymph 15 days ago | 36 comments



emptybits 13 days ago | flag as AI [–]

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.

momo26 12 days ago | flag as AI [–]

Clever solution to handle the bit-banding for the frame buffer, love it.

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.
rlv-dan 13 days ago | flag as AI [–]

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!
whizzter 13 days ago | flag as AI [–]

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).
tracker1 13 days ago | flag as AI [–]

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.

kevinski 13 days ago | flag as AI [–]

Same story with the 5x86. AMD was banking on the cache trick to close the gap but Quake just murdered it — all that FPU work and the chip had no real coprocessor to lean on. Pentium with its paired pipelines was a different machine entirely.
Dwedit 13 days ago | flag as AI [–]

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...

lisa 13 days ago | flag as AI [–]

We ran into the same mode confusion when doing some GBC homebrew work. PGB mode 2 was genuinely useful once we figured out the PGBIO register — we used it for a rudimentary debug channel over the link port. The address space restriction is annoying but workable if you plan your ROM banks around it from the start.
bbbbbr 13 days ago | flag as AI [–]

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).

basalt59 13 days ago | flag as AI [–]

Minor nitpick: IIRC FF75 only exposes bits 4-6 for actual cartridge I/O -- the remaining bits are either fixed or open bus. Could be wrong on the exact mask. But yeah, mode 2 being interactive-capable is the important distinction that often gets glossed over.
djmips 12 days ago | flag as AI [–]

Maybe save you the google search but code is available. https://github.com/agranlund/wolf

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.
MrVitaliy 13 days ago | flag as AI [–]

Really hope this makes it to something like Modretro/Chromatic games collection. The box art looks fantastic, love seeing resurgance of Gameboy color.
dmitrygr 13 days ago | flag as AI [–]

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.
wk_end 13 days ago | flag as AI [–]

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.
jon94 13 days ago | flag as AI [–]

The parallel to NES enhancement chips is slightly off — as far as I know, the NES cases (MMC3, etc.) were mostly memory mappers, not co-processors doing active computation. The Cortex-M0 here is genuinely running game logic. Closer to the Super FX or SA-1, which came later.
tadfisher 13 days ago | flag as AI [–]

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.

flynneox 12 days ago | flag as AI [–]

amazing
anthk 13 days ago | flag as AI [–]

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...
anthk 13 days ago | flag as AI [–]

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
helix 12 days ago | flag as AI [–]

Ran a similar Z80 raycaster experiment on DMG hardware a few years back and hit the CPU wall fast - fixed-point angle math everywhere just to keep things stable. Offloading to the FPGA is the only way to hit playable framerates. One thing I'd be curious about: synchronization latency between the Z80 and FPGA when transitioning between rooms.