OpenJazz is a free, open-source version of the classic Jazz Jackrabbit games
24 comments
·January 26, 2025bonzini
bananaboy
It’s not really that unusual. It’s a tweaked mode-x. The original programmer Arjan Brussee even says this https://retrocomputing.stackexchange.com/a/14403/25183
bonzini
I am not aware of any other game using the variant with odd/even mode, nor of any documentation of how the blitting worked. Maybe someone should ask Arjan about the source code that he mentioned on stackexchange. :)
Cumpiler69
>Jazz Jackrabbit employs some really unique VGA programming to do fast blitting
Isn't this similar(identical?) to the tricks John Carmack used to get side scrolling Mario clones like Commander Keen working on the PC platform, who's rudimentary graphics system couldn't do that back then?
bonzini
No, it's not. Keen 1 was a 16 color game; 16 color games pack 8 pixels in a byte and spread the color information across 4 planes. Accessing the different planes requires programming the video card's registers and there isn't really a way to change the representation of the pixels in memory, what Carmack did was write fast blitting routines and use the hardware's smooth scrolling capabilities. All these were hiding in plane sight in the EGA/VGA manuals, they are exactly how the hardware was supposed to be used even though nobody had done it before Keen.
256 color modes are a different beast. The VGA can only load four bytes at a time but those four bytes must have the same address and come from the four planes. So whereas the 16 color mode split the color information across planes, 256 color modes put a whole pixel in a byte and four adjacent pixels go into four planes. Normally you want 1 byte per pixel and ignore planes completely, so the hardware is programmed to remap bits 0-1 of the address to the planes and do some magic so that reads also work as intended. You can still do smooth scrolling in this mode, but double buffering requires more expensive copies from VRAM to main memory.
Michael Abrash then noticed that this is absolutely not necessary and you can use planes in 256 colors mode. Unlike Carmack's Keen, this was completely undocumented. In retrospect it's quite obvious: the VGA was composed of two completely independent pieces of hardware dealing respectively with CPU accesses to VRAM and creating the video output from VRAM contents, and as long as the two are programmed in a compatibile manner things just work. But still it's not how you were supposed to do 256 color graphics on the VGA.
This was called "mode X" and it gives you several benefits: VRAM to VRAM copies are cheaper, which you can use for both blitting and double buffering, and you have access to 256K of memory which enables higher resolutions (theoretically up to 360x480, in practice everybody used 320x240). This worked well for games like DOOM or Wolfenstein 3D that redrew the whole screen at once, however the wins for blitting were a lot less clear because dealing with the 4 planes meant more complicated routines and a lot of writing to the card's registers.
So what Jazz does is use a middle ground mode where you have bit 0 of the address used to pick 2 planes and the other 2 are picked through the video card's registers. Normally this is used in text mode so that even bytes describe characters and odd bytes describe colors, hence odd/even mode. Jazz applies it to 256 color mode and then it only addresses pairs of pixels at once, so that it doesn't have to program the video card registers as much as in 4-plane mode X. Essentially the graphics mode is a 160x200 matrix where each of the 160 horizontal cells is composed of two pixels.
phire
> All these were hiding in plane sight in the EGA/VGA manuals, they are exactly how the hardware was supposed to be used
Well...
Keen 1-3 only scrolled by a maximum of 16 pixels. After that, it would reset the scroll and copy the entire screen over by 16 pixels (one tile). In order to reduce the amount of copying, the levels were all designed with repeating patterns to minimise the number of changed tiles on each scroll.
Why? Because the documentation didn't say what happened if the hardware scrolling wrapped around, and Carmack carefully designed the engine to avoid this potential edge case. They named the technique "Adaptive tile refresh".
For episodes 4-6, Carmack was confident enough in the wrapping behaviour of hardware scrolling, and the engine was redesigned to take advantage of this. I guess they had tested enough 3rd party EGA cards to be sure they all behaved in the same way.
This removed the need for repeating patterns in the level, allowing for much improved graphics. Though they did need to add a compatibly mode that avoided wrapping across the 64KB boundaries, as some SVGA cards did the wrong thing.
So the scrolling was documented, but perhaps not well enough.
claxo
Currently discounted on GOG, at 0.65 usd, with all the media. https://www.gog.com/en/game/jazz_jackrabbit_collection
Gormo
Looks and sounds great, and works at resolutions greater than 320x200! The game content consists of raster tiles and sprites, so I've just set to to 640x400, which works great on my 1920x1200 display.
Although that website contains what must be the most egregious misuse of a hamburger menu I've ever seen.
mvdtnz
Where are the raster tiles and sprites in the source code? I'm struggling to find them.
jsheard
They're not in the source code, for this type of project to be above board they can't distribute any of the games original assets. The user has to bring their own copy of them.
fragmede
Which they can buy from https://www.gog.com/en/game/jazz_jackrabbit_collection
johnorourke
I remember downloading this on a 9.6kbaud modem from a local BBS... and being absolutely blown away by it! My little brother played it to death, so much so that it inspired my first attempt at a game - "kill jazz", where you simply kill Jazz many times over.
all2
I have the original floppy of this, plus packaging, sitting in the other room.
I remember sinking hours into this on my parents' Windows 3.1 machine (maybe it was an old dos box).
gareth_untether
The music gave me a nostalgic hit and I never played the game! The developers were clearly inspired by Sonic which was released three years earlier for the Mega Drive in 1991.
ajsnigrutin
Not sure if projects are related, but this also exists:
Joel_Mckay
Nice, they seemed to get the frame rate right unlike the Earthworm Jim players:
https://arcadespot.com/game/earthworm-jim/
I think Jazz was the first game that ran smoothly on old hardware. Could be fun to pick up a full retro CD set like the Doom collection. The publisher should still consider the Steam store, as on a Deck the lower resolution wouldn't seem as dated.
Fun games =3
pezezin
Ha, last week I finally finished assembling my retro PC, and just yesterday I was showing Jazz Jackrabbit to my girlfriend's son. He liked it, and he was surprised to see the "Epic Megagames" logo, he didn't know it was such an old company xD
As for me, playing one of my favourite childhood games on real hardware again, with a good CRT and a Sound Blaster, almost made me cry, the nostalgia hit was enormous :S
accrual
Awesome story! I also enjoy the real hardware nostalgia. I got an Am386-DX40 up and running this afternoon after replacing the Varta battery and adding a CF card. What hardware did you use for your build?
pezezin
Thank you! I wanted a machine that could play both MS-DOS and Windows 9x games with good performance, so I set myself the goal of trying to get the coolest hardware up to 1999.
- Pentium 2 at 300 MHz
- 384 MB of RAM
- Nvidia TNT2 Ultra
- Sound Blaster AWE64 Gold (the last ISA model, a PITA to get it working because modern ATX power supplies don't provide the -5V required by ISA cards, so I had to find an old enough PSU)
- 32 GB CompactFlash
- The cheapest CD drive, floppy drive, PS/2 keyboard and ball mouse, and speakers that I could find at my nearest junk store
- Sony Multiscan E200 that I got for free from a very generous office colleague!
- A proper beige box
- Windows 98 SE
The total cost was around 300 bucks, with the AWE64 being the most expensive component at 100 bucks. Not cheap, but well worth it for the nostalgia trip.
I would also like to find a Voodoo and a GUS, but they are ridiculously expensive nowadays.
prmoustache
That sounds very pricey for an old computer that virtually nobody want except a few geek.
I swear this is the kind of computer that sell for 30€ around here without the gpu (that you can get for 10€). Indeed the awe32 seems to be the most costly part but you can find it way under 100 bucks.
Might be regional.
null
Jazz Jackrabbit employs some really unique VGA programming to do fast blitting. Relatively many people are familiar with linear mode (64K of usable memory, fast blitting but no double buffering) and mode X (256K memory, complicated or slow blitting, and double buffering at 320x240).
Jazz was as far as I know the only game to use odd/even mode, which is normally used for text mode, for 256 color graphics. It gives 128K of memory, extremely fast blitting and double buffering at 320x200 and is a super interesting hack, but it's almost completely undocumented. I only found out because QEMU made a mess of it until I decided I wanted to play some Jazz. :)