RetroBox Specification
Mattias Gustavsson, August 28, 2008Ok, so like I was saying last time, I'm working on something I call the RetroBox, which is kind of like a virtual oldschool computer.
I've decided on an initial specification for it now. That's basically just a bunch of arbitrary limitations I've decided I want to apply to the RetroBox, which might seem weird, but keep in mind that: 1) I want the RetroBox to be very much like an oldschool computer like the Commodore 64 or Atari ST and 2) I believe that having fixed limitations to work within can actually help you focus on making your game, rather than just focusing on things like technology or compatibility.
Ok, so here goes... I will go through the central aspects of the RetroBox, and my reasoning behind it. These things are all preliminary at the moment, but I'll have them locked down within the next few weeks, as I implement the whole thing.
Colors: 80 concurrent from 4096 available
The RetroBox will have a palette of 80 colors at a time, out of a total colorset of 4096 available colors (12-bit colors). Of those 80 colors, 24 are fixed and cannot be changed (these are the System Colors) and 56 colors which can be chosen from the available colorset (those are the Custom Colors) .
System Palette:
The default settings for the custom palette:
I think this is quite generous compared to the C64 with 16 fixed colors, and the AtariST with 16 custom colors out of a colorset of 512 colors. The NES had 56 fixed colors. So all in all, it's not so many colors that you can totally go crazy with it, and it's not so few that you'll have to struggle every step of the way. The fact that there's 4096 available color, means that the R, G and B components of a color can each be described with one character when using hex (0-F), so for example, hot pink would be $F0F, and medium gray would be $777. Which is a quite neat way of describing colors :-)
Having a fixed set of system colors can be real nice, as you'll always know they will be there, which means they're ideal for things like UI or when making editors etc.
Resolution: 320x200
The resolution of the RetroBox is 320 pixels wide by 200 pixels high. However, the whole screen will be 400x300 pixels, which means there will be a border around the screen, just like in the good old days :-) I'll also provide some sort of mechanic to change the border color for each scanline, independent of the palette, so you could create that "raster color" effect from the old days...
Sound: 8 channels (6 chip channels, 2 channels for digitized sound)
Of course there will be sound support as well. I haven't given this too much thought yet, as I know I'll need to learn a bit more about how soundchips used to work, but I'm thinking it would be nice to support WAV sound, and 2 simultaneous sounds would be about right. In addition, I want some sort of soundchip as well, like the SID chip of the C64 or the YM chip of the Atari ST, for that nice, solid retro feel. So I was thinking 6 channels of chip sound in addition to the 2 digital channels.
This would allow you to, for example, have a music track with 3 chip channels and one digi-drum channel, while still having 3 chip and one digitized channel left for ingame sounds. Which certainly should be enough...
Sprites & Blitter
There will be built-in support for Sprites, just like there was on the C64. I'm thinking 64 sprites, each with a maximum size of 128x128. The width and height must be a power of two value of eight or higher, so 8, 16, 32, 64 and 128 are valid width or height values for a sprite. All 80 colors may be used freely in a sprite.
I'm also thinking that it would be nice to have a built-in "blitter", functionality that allows you to really quickly copy data with lots of different options, making it ideal for implementing fast drawing of bitmaps.
Using a TV as monitor
Ok, so I've saved the more unusual thing for last... Have you ever noticed how, when running old games in an emulator, they often don't look as nice as you remember them... That's not just your mind playing tricks on you, it's because the old machines was usually running on old TV's, which made the colors on the screen bleed and blend quite a bit, making things look better than they really should...
The RetroBox will emulate that look, and I'm happy to say I think it will emulate it pretty well. More on this in a later entry :-)
So, that's what I have in mind. Stay tuned for the next update, when I will go over the RetroBox CPU and its instruction set...