Raising Hell - How the Hellraiser Cartridge Might Work

 

  For videogame fans, Hellraiser on the NES is like the Holy Grail, Fountain of Youth, Ark of the Covenant and Baby Squirrels all in one. Proposed to be the "game with the best NES graphics ever!" it was to be released by Color Dreams, long before they got into their Bible Adventures phase. Considering the quality of their games it was kind of a long shot that Hellraiser would even be any good, but the improved graphics was nevertheless intriguing.

 After reading a few articles on the subject, I'd like to propose how this cartridge might have worked. While programming a Z80 processor is a little beyond me, it'd be cool if a homebrew cartridge kind of person caught wind of this and took a crack at recreating the long lost Hellraiser "Super Cartridge" (SC henceforth) NES fans would have a field day. Without further ado...


Bitmapped Graphics 

  As most of us know the NES uses character / tile based graphics. The big feature of the SC would be the bitmapped graphics it would allow. Apparently Hellraiser was going to be "Wolfenstien 3D"-esque, so I guess it would need that! While some have suggested this as impossible, here's my theory on how they might have pulled it off. Remember, apparently the hardware was complete and working, they just never finished (or barely started) the game itself.

    Requires:

1) 16k video RAM on-cartridge, on both the Z80 and NES's character graphics bus (CHR D0-D7, CHR A0-A12) Possibly another 16k video RAM as a frame buffer (See "Problems")

2) PPU scanline counter (like the MMC3) based off the rising edge of the CHR A12 line I believe.

   How it works:

1) The NES program fills the first Name Table (tile-based background area of memory) with the following pattern:


Figure 1 - The Name Table character layout. This never changes. Click for bigger version.

1) The Z80 draws the screen onto the 16k video RAM, as a 256x240 2 bit color image (4 colors possible)

2) The first 4k of the 16k on-cartridge video RAM is mapped to $0000-$1000 of the CHR address range. This is the first half of the Pattern tables and provides 256 different characters titles, $00-$FF.
      (Note: Or map it to the second half, depending on which is being used for the background tile graphics)

3) Note in the above Figure 1, how characters 0-255 are mapped going left to right to fill up the screen. Every 8 "tile lines" (64 scanlines) the characters repeat.

4) The PPU begins to draw the screen at 0x0. Since the characters are laid out in the name tables as they are in memory, it should reproduce the top 64 scanlines (top 4k) of the video RAM as drawn by the cartridge, much like a regular raster display in screen memory.

5) The scanline counter on the cartridge will detect every 64th scanline. This is when the PPU reaches the end of the 256 characters and the characters will start repeating themselves on the next line. (the "4k Character ROM bank switch" in Figure 1)

6) During the horizontal blank after scanline 64, the cartridge switches to the NEXT bank of 4k in the 16k video RAM. Thus, as the PPU draws the next 256 characters/8 lines/64 scanlines, it's an all new set of "characters" There are 4 "banks" of characters per screen, though we don't see the last 2 lines of the last bank, since the display is 32x30 tiles, not 32x32.

7) The RAM bankswitching could be performed by the Z80 or a 8 bit counter. (bits being 0-7) Basically...

     a) Bits 0-5 would count every 64 scanlines, based off the rising edge of CHR A12 which would be tied to the CLK of the counter. This would then cause Bits 6 & 7 to act like a 2 bit counter triggered every 64 cycles.

     b) Bits 6 & 7 would be tied to the A12 and A13 lines of the 16k video RAM, to select which 4k bank to bring up. 00=Bank 0 01=Bank 1 10=Bank 2 11=Bank 3

     c) During the vertical blank the counter would be reset to 0, so it can start over when the screen is redrawn. This would also put the video RAM back to Bank 0, as bits 6 & 7 would be 00

Potential Problems:

1) Would there be a "clean" transition at the bank/scanline changes? Ever notice most MMC3 games that have a "split screen" effect, there's a bit of flutter just above the line and about 2/3 across the screen? (Real NES's, not emulated) See Mega Man 3, Super C, Mario 3

2) When would the Z80 draw the 16k video RAM screen? Wouldn't that interfere with it as the NES addressed it?

3) On that note, would a second 16k RAM be required as a draw-screen frame buffer? Could this be swapped into the NES addressed 16k video RAM quickly enough, say during the vertical blank? Maybe this is why Hellraiser had 64k of RAM

4) What could be done about the 4 color limitation?


   That's about all the thinking I can for now on this, but I'd encourage people to give it some thought themselves. A homebrew of the "Lost Hellraiser" cartridge might be cool! Email me to discuss! If I'm WAY off on something let me know, but I think the principal is sound. Maybe an even BETTER CPU could be used, like a 68000!

  Or perhaps this "super cartridge" could use a memory card, like the Cuttle Cart 2. Therefore, you get the super cartridge and play the games off the memory card. It could be a new classic gaming platform!

   I'll probably update this page with some ideas on sound and color improvement... If you have any ideas, let me know and I'll add them. Let's raise some hell!

 


  Back to www.benheck.com Homepage