Skip to content

UNO for Vintage Computers v1.0.4

Choose a tag to compare

@jhonnaker1 jhonnaker1 released this 22 Jul 02:34
· 22 commits to main since this release

Changes since v1.0.3

  • Texas Instruments TI-99/4A port added. A fifth CPU family for the repo -- TI's 16-bit TMS9900 -- built with gcc 4.4 carrying mburkley's TMS9900 patches plus Tursi's libti99, since nothing packages a TMS9900 compiler. Its TMS9918A has no per-cell colour at all: one 32-byte colour table colours groups of eight character codes, so colour belongs to the glyph, not the screen position. The port buys colour back the classic TI way, by spending character codes on it -- six 24-code ranges (four suits, wild, and a cursor highlight) each hold the same 23-glyph card alphabet in their own colour, budgeted across exactly 32 groups -- giving solid colour card tiles like the X16/VBXE/F256 tile ports on hardware that nominally can't do them. SN76489 sound means three real voices, so UNO and the win flourish are chords rather than beeps. At ~12K the game outgrows the 8K cartridge window, so it ships as a two-bank cart whose ROM stub copies the program into the 32K expansion and runs it from RAM.

  • Foenix F256K port added. The first 65C02 Foenix machine here, and the first target where sound comes for free from the C64 port: the F256's left SID sits at $D400, register-for-register identical to a 6581/8580 -- same base address the C64 uses -- so f256snd.c is a close port of the C64 port's sid.c. Cards render as solid colour tiles in the Vicky per-cell-colour text mode (like the X16/VBXE tile ports); the char and colour matrices share the $C000 I/O window, paged via MMU_IO_CTRL ($0001), while SID and the Vicky control registers live in the fixed I/O page 0 alongside it. Built with cc65, packaged as a PGZ loaded off the SD card by FoenixMCP and run from SuperBASIC with /- uno; keyboard input polls the kernel's event queue. Verified end-to-end (including audible SID effects) in a f256k MAME driver. Source in f256/.

  • Amiga: bitmap-graphics build added. A second Amiga build (make bmp) that renders the game as pixel-art cards in a custom 320x256, 16-colour lores screen instead of the text build's console.device characters -- the same card/hand design as the Atari ST and X16/VBXE bitmap builds. It draws through graphics.library, so unlike the ST port (which hand-masks four bitplanes) the planar framebuffer is the OS's job and the card bodies are RectFill()s that run on the blitter; text is the topaz ROM font via Text(), so no embedded font is needed. The text build (uno-amiga) is unchanged. Source in amiga/ (gfx.c/ui_bmp.c/main_bmp.c).

  • Atari ST/STE port added. The second 68000 machine here, and a completely different target from the Amiga -- GEMDOS/TOS rather than AmigaOS, so it needs its own toolchain (vbcc with the m68k-atari target, built from source; there's no Homebrew package and the old cross-mint tap is gone). It's also the only machine in the collection with no text mode at all, and its framebuffer isn't chunky -- it's four bitplanes interleaved by word, so a pixel's colour is assembled from the same bit position across four separate 16-bit words. The video layer masks whole 16-pixel word groups across all four planes and draws card faces as nested fills to stay at word speed. Full-colour pixel-art cards and a fanned hand in 320x200/16 colours. The palette is written in STE 4-bit-per-gun encoding, whose extra bit sits in bit 3 as the least significant bit and is simply ignored by a plain ST -- 4096 colours on an STE, a graceful fallback to the ST's 512, from one code path -- and the title screen tells you which machine it detected. Carries its own 8x8 font (the ROM font is only reachable via Line-A/VDI), YM2149 sound through XBIOS Dosound(). Source in ste/.

    Bringing it up also surfaced a latent bug the 6502 ports had been hiding for the whole life of the project: the shared GameState put a single draw_count byte between the two Card arrays, landing discard_pile on odd offset 217. Card is two bytes with byte alignment, so that's legal -- but the compiler renders a two-byte Card assignment as one move.w, and a 68000 traps on a word access to an odd address. Harmless everywhere else, an instant Address Error here.

  • Atari 800XL VBXE: bitmap-graphics build added. A third Atari build (make all-vbxe-bmp) that renders the game in the VBXE Overlay's SR mode -- a real 320x192, 8bpp chunky framebuffer with a 256-entry 24-bit palette -- instead of the text overlay. Pixel-art card faces (drop shadow, suit border, corner values, centre badge) and a fanned overlapping hand, with the Atari ROM charset blitted into the framebuffer for text. Selecting the mode meant deriving the SR-mode XDL from Altirra's own kOvModeTable (the graphics entry needs the GMON control bit rather than text's TMON). Same rules, input and POKEY sound as the text build; the text uno-atari800xl-vbxe.xex is unchanged.

  • Amiga text build: centred layout + much faster redraws. The title and table were centred on console.device's full 80-column model, but only ~65 columns are actually visible, so they sat right of centre -- now centred on the visible width, lined up with the opponents row and hand. And redraws were doing one synchronous DoIO per escape/character (hundreds to over a thousand per turn); output is now batched into a single write per frame, so the screen no longer visibly repaints a character at a time.

How to run each one

  • uno-c64.prg — Commodore 64. x64sc uno-c64.prg in VICE, or a real C64 + disk/cart tool.
  • uno-c128-40col.prg — Commodore 128, 40-column (VIC-IIe). x128 uno-c128-40col.prg.
  • uno-c128-80col-vdc.prg — Commodore 128, 80-column (VDC chip). x128 uno-c128-80col-vdc.prg.
  • uno-plus4.prg — Commodore Plus/4. xplus4 uno-plus4.prg.
  • uno-pet4032.prg — Commodore PET 4032, 40-column (keyboard only, no joystick port). xpet uno-pet4032.prg.
  • uno-pet8032.prg — Commodore PET 8032, 80-column (same family as the 4032). xpet -model 8032 uno-pet8032.prg.
  • uno-vic20.prg — Commodore VIC-20 + memory expansion. xvic -memory all uno-vic20.prg.
  • uno-atari800xl.xex — Atari 800XL. atari800 -xl -xlxe_rom <your ATARIXL.ROM> -nobasic uno-atari800xl.xex (you need your own Atari XL ROM dump; not included here).
  • uno-atari800xl-vbxe.xex — Atari 800XL + VBXE. In Altirra: configure the machine as an XL with 64K memory (not a RAMBO-style expansion -- the cc65 runtime's XL check fails under those), a real Atari XL OS ROM, and the VBXE device at the default $D6xx base, then boot the .xex. Now with legal-move highlighting (cards you can't play are dimmed in their own darkened suit color so the playable ones stand out; an all-unplayable hand shows a "press UP to draw" hint) and a bolder pulsing selection cursor. Verified in AltirraSDL/AltirraBridge; see atari/README.md for the exact recipe.
  • uno-atari800xl-vbxe-bmp.xex — Atari 800XL + VBXE, bitmap-graphics edition. Same game as uno-atari800xl-vbxe.xex but rendered in the VBXE's 320x192 256-colour framebuffer (pixel-drawn card faces, fanned hand) instead of the text overlay. Same Altirra setup as the text VBXE build above: XL with 64K memory, a real Atari XL OS ROM, and the VBXE device at the default $D6xx base.
  • uno-atariste.tos — Atari ST or STE. In Hatari, put it on an emulated GEMDOS drive and autostart it: hatari --machine ste --tos <your tos.img> --harddrive <folder containing uno-atariste.tos> --auto 'C:\UNO-ATARISTE.TOS' (you need your own TOS ROM, or free EmuTOS; not included here). Or just copy it onto a floppy/hard-drive image and double-click it from the GEM desktop. Runs on a plain ST too -- it detects which machine it's on and drops from the STE's 4096-colour palette to the ST's 512 automatically. Keyboard only (see Controls).
  • uno-apple2e.system — Apple IIe (enhanced), ProDOS .SYSTEM file. This is not a bootable disk image by itself — see the apple/ README section for how to inject it into a ProDOS disk image, then run it in MAME's apple2ee driver.
  • uno-amiga — Commodore Amiga, Kickstart 2.0+. In FS-UAE, put this binary in a folder alongside an s/startup-sequence file whose only line is uno-amiga, then mount that folder as the boot hard drive with a Kickstart 2.0+ ROM — it autostarts on boot, no disk image and no shell typing needed: fs-uae --amiga-model=A1200 --kickstart_file=<your kickstart.rom> --hard_drive_0=<that folder>. (To run it by hand instead, drop the startup-sequence and type uno-amiga at the AmigaDOS shell.)
  • uno-amiga-bmp — Commodore Amiga, Kickstart 2.0+, bitmap-graphics edition. Same game as uno-amiga but rendered as pixel-art cards in a 320x256 16-colour screen instead of colored text. Run it the same way in FS-UAE: put it in a folder with an s/startup-sequence whose only line is uno-amiga-bmp, then mount that folder as the boot hard drive with a Kickstart 2.0+ ROM and it autostarts on boot (fs-uae --amiga-model=A1200 --kickstart_file=<your kickstart.rom> --hard_drive_0=<that folder>). Movement is comma/period and U (see Controls).
  • uno-cbm510.prg — Commodore CBM-II (510/P500). xcbm5x0 uno-cbm510.prg in VICE.
  • uno-f256k.pgz — Foenix F256K. Copy it onto an F256 SD card image (or a real SD card), boot to SuperBASIC, and run /- uno (/- hands off to the pexec chainloader, which loads uno.pgz and its PGZ header names). Renders cards as solid colour tiles via the Vicky video chip, with real SID sound; keyboard only (,/. move, space plays, U draws, 1-9/0/A-J jump to a hand slot). Developed and verified against a f256k MAME driver.
  • uno-ti99-4a.rpk — Texas Instruments TI-99/4A, cartridge image. mame ti99_4a -cart uno-ti99-4a.rpk -ioport peb -ioport:peb:slot2 32kmem — the 32K expansion is required, because the cartridge copies the game into that RAM and runs it there. At the TI title screen press any key, then 2 to pick UNO from the console's selection list. Keyboard only (,/. move, space plays, U draws, 1-9/0/A-J jump to a hand slot) — the TI's arrows are FCTN+S/D/E/X and don't come back as plain ASCII. The .rpk is a zip; uno_b0.bin and uno_b1.bin inside it are the two 8K banks, in that order, for real hardware.
  • uno-zxspectrum.sna — Sinclair ZX Spectrum 48K, ready-to-run snapshot (no LOAD needed). mame spectrum -snapshot uno-zxspectrum.sna, or drag onto any emulator that accepts .sna files. You need your own ZX Spectrum 48K ROM for MAME; not included here.
  • uno-c64os.zip — C64 OS application bundle (about.t/main.o/menu.m inside a uno_1.0/ folder). This one's different from every other asset here: it's not a standalone binary you hand to an emulator, it's an app you install into an existing C64 OS boot volume. You need C64 OS itself already set up first (real hardware, or VICE x64sc with a CMD HD/SD2IEC image and the C64 OS .dhd -- C64 OS is Greg Naçu's commercial product and isn't included here). To install: unzip so uno_1.0/ lands directly inside /os/applications/ on that volume, then launch it from C64 OS's own file manager or app menu. Full setup walkthrough (VICE device numbers, JiffyDOS test harness, etc.) in c64os/README.md.
  • uno-mega65.prg — MEGA65. In Xemu's xmega65 (with a MEGA65 ROM): xmega65 -rom <mega65-rom.bin> -prg uno-mega65.prg. Renders cards as color-bordered boxes on the VIC-IV (40-column) with SID sound; keyboard or joystick. Real hardware works too.
  • uno-cx16.prg — Commander X16. In the x16 emulator (with its rom.bin): ./x16emu -prg uno-cx16.prg -run. Renders cards as solid VERA color tiles with legal-move highlighting and a real hardware-sprite card toss; keyboard or joystick. Real hardware works too.
  • uno-cx16-bmp.prg — Commander X16, bitmap-graphics edition. Same game as uno-cx16.prg but rendered in a 320x240 256-colour framebuffer (pixel-drawn card faces, fanned hand) via the KERNAL GRAPH API. ./x16emu -prg uno-cx16-bmp.prg -run.
  • uno-coco3.bin — Tandy Color Computer 3, Disk Basic machine-language file. In XRoar: xroar -machine coco3 -run uno-coco3.bin (needs your own CoCo 3 ROM; XRoar's default ROM search path or -rompath should point at it -- see coco/README.md). -run attaches the file and autotypes LOADM/EXEC for you.

Controls

Joystick (where the hardware has a port) or keyboard: cursor left/right to pick a card, space/return to play or confirm, cursor up to draw, or jump straight to a card with 1-9, 0, A-J. Several machines can't do that, each for its own reason, and all land on the same fallback — ,/. to move and U to draw: the Amiga (its cursor keys didn't work reliably through the console input path), the Foenix F256K (arrow keys arrive through the kernel event queue with no ASCII, so they'd need raw scancodes), and the TI-99/4A (its arrows are FCTN+S/D/E/X and come back as control codes rather than plain ASCII). D would be the obvious draw key, but A-J are already the quick-play keys. The ZX Spectrum uses O/P/Q instead, since a real Spectrum keyboard has no cursor keys at all and 1-9/0 are already spoken for. The Atari ST/STE is keyboard-only (cursor keys and space): the ST's joystick ports sit behind the IKBD, which only reports sticks after being switched out of mouse mode and serviced on an interrupt vector -- and Hatari can map the cursor keys to a joystick anyway.

Full source, per-platform build instructions, and design notes are in the main README.