Conversation

bad idea:
a fantasy console (a la Mega65 or Asspull IIIx) but as you read the documents closer it turns out it's just a DOS PC with a video card that has sprites and layers

1
1
0

because I love the idea of fantasy consoles but the problem is that my ideal console is just a PC... maybe with a slightly better video subsystem

1
0
0

video specs:
320x240x256 colors or 640x480x16 colors
sprites: 32 independently moveable sprites, 16x16 pixels, 15 usable colors + transparent
layers: 4 layers: three tiled + one bitmap. layers can be scrolled separately, and are made of 8x8 tiles. adjustable priority, with default priority having the bitmap topmost

each tile layer has a separate 16-color palette, each sprite has a separate 16-color palette.

1
0
0

there. it's an early-90s DOS PC but you can do more interesting graphics easier

1
0
0

the palettes work by having each tile and sprite have a 4bit index, which specifies which 16-color slice of the global 256-color palette that sprite uses

0
0
0

it doesn't need a separate text mode: it boots up and the FGA firmware sets the planes up so that one of the tile planes is on top and loads the tileset with a font.

since the tiles are 8x8, it uses two tiles for each letter, resulting in an 80x30 text screen

1
0
0

you can easily tell an FGA display apart from a VGA display even in text mode because you get smooth scrolling in DOS, like when you run a DIR

1
0
0

FUCK now I gotta mock that up to see how it'd look

1
0
0

no. bad foone. no writing code for a fantasy console you don't want to make

1
0
0

sprites have a flags register, with the usual options:
* horizontal flip
* vertical flip
* double wide (32 pixels wide)
* double tall (32 pixels wide)
* rotations (0/90/180/270)

I'm intentionally not counting how many bits this is because if you start thinking about the bitfields of your fantasy console's video card.... you have already started building a fantasy console

1
0
0

tiles use a 16-bit index. the source tiles take up a segment, and since they're 8x8 at 4bits per pixel, that's 32bytes a tile, meaning you can have 2048 tiles per plane

1
0
0

tilemaps themselves are similarly segments, and at 16bits an index you can fit 32768 tiles in them.
This is adjustable in geometry, so you can have 256x128 tiles or 512x64 or whatever

1
0
0

keeping in mind that one tile layer shows 80x60 tiles in 16 color mode, and 40x30 in 256 color mode

1
0
0

it reuses the same bitmask as the sprites for the layers, so any layer (including the bitmap) can be flipped/rotated/doubled.

1
0
0

it doesn't let you do HBLANK/HDMA trickery, sorry. I don't like such things in my graphics.

if you fiddle with registers/sprites/palettes while it's rendering a frame, the changes don't show up until the next frame

1
0
0

but you can emulate some of them with a panning map. Each row of the display can have an offset applied to it, which pans that line left or right by that many pixels

1
0
0

software wise:
we boot into a DOS-like if there's no floppy in the drive (BECAUSE YOU KNOW IT'S FLOPPY BASED) or it'll boot the floppy if it's inserted when powered on.

yeah that's how PC booters work, but here we keep doing that.

DOS is in ROM, so it's usable by games to save games and such even when booted off a disk.

Games can be installed to the hard drive, and the game doesn't need to know the difference: it gets an emulated floppy that's backed by the install folder

1
0
0

no DRM or hardware-based copy protection here, but games are free to implement code wheels and manual-based protection and all that

1
0
0

no sound in the system by default (it flashes the overscan for a "beep" instead), but it has a MIDI port for external sound synths

1
0
0

a common accessory for gamers was the very beige Anole MusicBox: a device two two speakers, the left one having MIDI-in & volume controls, with the right one just being a speaker

1
0
0

it uses DB9 plugs for the MIDI, the extra pins carrying +5v and +12v, letting the speakers be powered by the PC

1
0
0

that's the Universal Peripheral Interface (UPI). The keyboard, mouse, printer, and external (floppy/hard) drives all use it. It's a kind of proto-USB

1
0
0

It uses a 36-pin centronics connector for the display, because it uses a digital interface with 24 pins for RGB, with the remaining pins being assorted grounds and syncs

1
0
0

they keyboard is numpadless. third party keyboards can have numpads but they do it by mapping the extra keys onto the number row. There's no numlock.

printscreen exists and saves bitmaps to the hard drive (or floppy drive, since you can have a harddriveless configuration), but the other two keys in that cluster are "pause" (implemented in the OS so it can pause any game that doesn't specifically handle that key) and "reset", which does a soft-reboot.

1
0
0

reset is commonly used to switch games. you just put in the other disk and hit it, and it jumps right to loading off the disk

1
0
0

the key between tab and shift is labeled "help" and is used instead of F1 to pull up onscreen help.
(unless a game is using it for maps or something)

1
0
0

UPI has a 5-bit device ID, which is automatically assigned by the OS at boot. UPI IDs are also used internally to refer to internal system components such as floppy drives, hard drives, and so on.

These take the form of a letter (or 1-6) and a colon

1
0
0

so your floppy drive is A:, your hard drive is C:, your keyboard is X:, your mouse is Y:, your video card is Z:

plug in a printer? it's now D:

1
0
0

so your Anole MusicBox might be E:. Fortunately you don't have to configure this: the OS has tables in memory that can be used to enumerate all UPI devices and their type. So a game will start up and find the first MIDI device, and you only need to configure anything if you have more than one MIDI device

1
0
0

the OS tables are also used to avoid having to configure the memory/IO/IRQ for your sound cards/modems/whatever

1
0
0

The floppy drive has change detection, and the OS automatically spins it up and reads volume IDs. So "insert disk 3" type prompts auto-accept the disk

1
0
0

if you boot it without a disk in (or boot it while holding HELP) you can go into a BIOS-type interface which controls the UPI devices, similar to a SCSI BIOS.

You can reassign IDs, enable/disable devices, and access any extra functionality a device might provide

1
0
0

devices have a BOOT ROM like functionality where they can tell the PC to run code when they're booted or reconfigured

1
0
0

so if you go into the UPI menu for your floppy drive, you've got common options like copy/format/test.

1
0
0

the video card has a feature connector that add-ons can connect to, which allows them to asynchronously replace the bitmap plane & palette.

This is used for the Anole 3DBox add-on card, which can push flat-shaded polygons for basic 3D acceleration

1
0
0

the 3DBox has built in support for dither-shading, since many games want to use the higher-resolution 640x480 16 color mode for "fancy 3D graphics"

1
0
0

think LHX-esque graphics:

1
1
0

the CPU is a fast 286 variant with no protected mode.
max of 16mb RAM
The base model has 1mb of RAM, so most games target that.

memory above 640kb has to be accessed through an EMS-like mechanism, because it's still basically a PC

1
0
0

the video card automatically allocates sprite 31 for the mouse cursor, if a mouse is connected.

1
0
0

basically I want to design something like PC98 or FM Towns, where it's a "mostly a PC, but with some different BIOS/OS/video hardware".

that's peak fantasy console for me

2
0
0

the system has some battery-backed NVRAM it uses to store the UPI settings.

This is so when you insert a game disk and turn it on (or hit reset), the BIOS doesn't need to slowly figure everything out, it just assumes nothing is changed and starts loading the game as soon as possible

1
0
0

@foone Like an Amiga but with an x86 CPU?

1
0
0

@foone I’d like to see a dream machine like that one… ablobcat_uruuru

Also, if it’s done from scratch, can it be designed to just bypass the 640MB nonsense limit and use the full address space? Wasn’t that limit imposed by some dumb MS-DOS decision?

1
0
0

@cinnamon more of a PC decision, rather than DOS. It's not really the OS or processor that imposes the 640kb limit, it's how the IO-mapped hardware is set up. So you could ignore it, but you wouldn't be compatible with PCs

0
0
0

so manuals for games always say like "if you have trouble running the game, try removing the disk, booting the OS, then insert the disk and hit reset"

that'll do a re-enumeration of all the devices, memory tests, all the boring slow stuff the POST does in PCs

1
0
0

gamepads exist (but not joysticks), but they're implemented as a subset of keyboards.
a gamepad has a D-pad and up to 8 buttons (with 5 being standard) and works by (virtually) pressing keys on the keyboard.

Which keys it presses can be controlled from the UPI config, and it defaults to something like space/ctrl/alt/enter/escape

1
0
0

the UPI config can be triggered from user software, so games can have a menu option to remap the gamepad

1
0
0

the base models are a cheaper wedge-model with built in floppy but no internal hard drive, and a desktop unit with double the memory, built in hard drive, and more internal slots for expandability

1
0
0

Imagine an Amiga 600 for the base model, and a Tandy 1000 for the desktop unit

(Tandy 1000 SX image by Jud McCranie, Amiga 600 image by Alexander Jones)

1
0
0

but with 3.5" disk drives, this is a 3.5"-floppy based system.

1
0
0

The wedge version includes a TV modulator for people without monitors. (for the desktop you'd need an external one)

1
0
0

Here's the keyboard. Sorry if it triggers a fight-or-flight instinct

(lord save me it has a project folder now)

2
1
1

the reset key is handled by the OS and isn't instant: you have to hold it for a second before it triggers

0
0
0

@foone wait I actually really like this keyboard because if your left hand is on WADS and your right hand is on the mouse, they can be closer together than they otherwise would be. but you still get to have a nav cluster

it would be even better with a keypad on the left as well

0
0
0

@ireneista @static @foone
This reminds me of my HP logic analyzer that's secretly a Mac II in disguise. For those who don't know, there was a time when Apple licensed out their hardware for weird systems like medical imaging equipment and logic analyzers.

In theory, I could add a lot of inputs to the system. Let's say 110 practical logic channels / 8 buttons per controller = ~ 13 players. That would be a weird console alright.

I know nothing about programming that sort of system, but maybe after I finish one of my current projects, I'll make 13 player pong or something silly. Call it Devil's Pong lol

0
0
0