Wolfenstein 3D – Gameboy cartridge with co-processor
happydaze.se
happydaze.se
That he then has the aesthetic capability to knock out a beautiful fucking box for the cartridge is just humbling.
http://www.gamefaqs.com/pc/564603-wolfenstein-3d/images/1456...
http://www.vgmpf.com/Wiki/index.php?title=File:Wolfenstein_3...
Is the gameboy hardware not good enough to play wolf3d by itself? Is a co-processor needed, or just more optimized / better software?
Most problematic is that the Z80 is only an 8bit CPU.
Original minimum requirement on PC for Wolf 3D was a 286, which was a 16bit processor running at 25mhz.
I remembered I couldn't play Doom though. It required a 386+.
The 256 color VGA frame buffer is perfect for this type of work because of the 1-1 relationship between bytes and pixels, and the simple correlation between memory offset and pixel position.
So you have a slower CPU that's 8-bit (basically an 8080) rather than 16-bit doing more work because of the complex graphics model.
Yep and will be for another 100 years or so assuming Carmack et al live another 30 plus the 70 for post-creator-death. Thanks Mickey Mouse! :D
The first Wolfenstein game was released in 1981.
But the Bern convention also have a stipulation that all signatories have to respect the duration of the initial nation of publication, and that can be longer than the minimum terms of the convention agreement.
Thus you get a ratcheting effect where multinationals will try to convince national governments to up their copyright terms to be "more competitive".
A kind of inverse to the race to the bottom that they first did on taxes between US states (leading to Delaware being the state to file your incorporation in), and has since applied across the globe under the banner of competition.
BTW, there is a claim that Lord of the Rings became popular because a US publisher thought he didn't need to respect Tolkien's UK copyright when publishing a cheap paperback. At the time USA had not yet signed the Bern convention.
Frankly it seems like a historic pattern where a industrial nation will begin to slow down, try to shore up its economy by using IP laws, and another nation coming along and ignoring those laws to bootstrap their own industry, and then repeating the patterns some decades down the road.
So far the changeover has been UK to USA to China. And you can basically see China trying to clamp down on their lax IP adherence right now.
https://github.com/id-Software/wolf3d
Edit: never mind, it's just the engine. The actual data files you need to pull from a copy of the game.
Serious kudos.
Basically you have an ARM processor doing a whole lot of work, and a Z80 in charge of moving it around and drawing supporting UI.
This guy is driving the CRT on an old mac with it...very cool: https://trmm.net/Mac-SE_video
The Amiga used a very similar setup between the chipset and the CPU.
And cartridge based consoles have often included coprocessors on the carts (but nothing as potent as this ARM). At the tail end of the SNES years there was even a simple "GPU" in some of its carts.
Starfox was the most famous example of that approach, right?
They're utilizing a dual-port SRAM, meaning that the co-processor can read and write to the RAM at the same time as the Gameboy CPU can read and write to it. Those pins along the cartridge edge are actually just the address and data lines of the Gameboy CPU.
They've written a program for the Gameboy CPU whose job is to DMA data from the RAM to video RAM (it's a bit more complicated due to the architecture of the Gameboy GPU not being set up for streaming video at it).
The game itself is running on the ARM co-processor, writing data to a known location in the DP-SRAM and the Gameboy CPU is streaming it to the display.
Very cool stuff!
Most games had their graphics tiles stored in ROM, but some games had 8KB of RAM instead of bank-switched ROM. Elite is in that category. So is Legend of Zelda, although Zelda's tiles seem to be stored verbatim in the program ROM, while Elite's must be algorithmically generated.
The KE04 I am using has 128Kb ROM and 16Kb RAM, and lacks hardware division. This presents some interesting challenges in terms of memory and rom space usage, and juggling speed vs ram/rom usage. You could of course put something much beefier in there but I think that would take too much of the fun away from the project.
All in all it's great fun and I'm learning a lot as I go along. If I were to make another hardware revision I would use a CPLD instead of the MBC1 chip, and try to loose the dp-sram in favour of a normal sram.
Cheers, --Anders
Nintendo really pulled off some impressive feats back in those days.
They originally codenamed it the Mathematical Argonaut Rotation I/O, or “MARIO”, as is printed on the chip's surface.
I wonder just how wildly impractical it would have been to build such outboard hardware acceleration into a cartridge in 1998.
The Gameboy had several address banks which allowed for whatever coprocessor you wished to put in, you just DMA out of the address space. I suspect the unit volumes just weren't there to justify the enigineering expense in the Gameboy's case.
Coincidentally, the Gameboy game X from 1992 ( https://www.youtube.com/watch?v=AyjU4MtonZM )was developed by Dylan Cuthbert, who later went on to work on Star Fox and the Super FX chip.
I think that transferring 60K of data from the CPU to PPU every frame would be completely infeasible, though. All that in mind, I'm very impressed by how well the game Elite runs: https://www.youtube.com/watch?v=zoBIOi00sEI
It's worth pointing out that the TI-83(+) contains a proper z80, running at 6MHz, with full support for the z80's extended instruction set and 16-bit arithmetic functions, which certainly helped this game out quite a bit. The Gameboy itself is somewhat underpowered in comparison; its Sharp80 processor is considerably stripped down, lacks most of the extended instruction set, and runs at a slower 4MHz. Given these limitations, I'm (a) staggeringly impressed to see Wolfenstein running on the thing in any capacity, and also (b) totally understand why the coprocessor is necessary to make it work, especially at that buttery smooth framerate. There's no hardware graphics scaling for one, all tech demos I've seen that do scaling appear to be doing so entirely in software and using hblank trickery to speed things up a bit. Doing a raytracer without hardware scaling for the texture lookups (or any ability to rewrite VRAM mid-scanline for that matter) would be pretty tough.
It's also curious to point out that this probably wouldn't be possible on the Black and White Gameboy (Pocket); from his frame disassembly, he's using the arbitrary DMA copy hardware exclusive to the Gameboy Color, and I don't think a straight sharp80 copy routine would be able to complete all 120 tiles during a single vblank and still have any room to do much of anything else.
I'm presently working on a Gameboy Emulator in Lua, and it seems like this is another esoteric cartridge I'll have a ton of trouble supporting. An entire additional CPU inside the cart! What sorcery :)
http://bgb.bircd.org/pandocs.htm#gameboytechnicaldata https://en.wikipedia.org/wiki/TI-83_series#Technical_specifi...
That was the first FPS game I played, and it appears to use a very limited form of raycasting. Maybe just drawing entire walls with one raycast and some scaling.