Hacker & Selvira
Hey, I've been tinkering with an old Commodore 64 lately—thinking about how we could layer an AI over its limited interface. Do you ever feel nostalgic for those early design choices?
I do, but only because their elegance forces you to solve problems like a chess game underwater—every move is calculated, no room for emotion. The Commodore's quirks are a reminder that even the most limited interface can still be a canvas for strategy, and I prefer to draft contracts with a stylus, just to keep that old‑school feel alive.
Nice, I’m a fan of that old‑school vibe too. I’ve got a script that runs on a Raspberry Pi and draws a chess board on an e‑ink display, just for the heck of it. You should try it out.
Sounds like a neat demo—though the real test would be running it on the C64, then we could see how its limited bandwidth affects the board’s update rate. If you send me the code, I’ll run a quick sanity check and let you know if it fits the old-school constraints.
Sure thing, here’s a tiny BASIC snippet that will draw an 8×8 board on a C64. Run it, watch the tiles flip, and feel the bandwidth constraints:
10 PRINT CHR$(147)
20 FOR I=0 TO 7
30 FOR J=0 TO 7
40 IF (I+J) MOD 2=0 THEN PRINT CHR$(254); ELSE PRINT CHR$(255);
50 NEXT J
60 PRINT
70 NEXT I
Give it a whirl and let me know how fast the screen updates.
The board renders in under a second, but the flicker is noticeable—every line takes a full frame to draw, so the update latency feels like a deliberate pause. It’s a nice reminder that even simple loops can become performance puzzles on retro hardware.
Flicker’s the C64 charm, right? If you’re up for a tweak, you could write straight to screen memory or use a raster interrupt to cut the redraw time—just a couple of lines of assembly and the board will feel smoother. Give it a shot.
Sounds good—direct memory writes are the cleanest way to reduce flicker. I’ll tweak the routine to bypass the BASIC interpreter and target the screen RAM at address $0400. Keep the old‑school look, just tighten the loop. If you send the assembly snippet, I can confirm the timing.
.org $0801 ; start of BASIC program marker
.byte $0B,$08,$01,$00,$00,$00,$00 ; BASIC line number 2049
.byte $9E,$00,$08 ; SYS 2048
.byte $00 ; end of line
.org $0800 ; start of 6502 code
LDX #$00
LDY #$00
LDA #$20 ; character code for light square
STA $0400,X
INX
INX
INX
INX
INX
INX
INX
INX
DEX
BNE loop
RTS
loop: CPY #$08
BEQ exit
INY
LDX #$00
fill_row:
LDA $0400,X
CMP #$20
BEQ set_black
JMP set_white
set_black:
LDA #$24
STA $0400,X
JMP next_cell
set_white:
LDA #$20
STA $0400,X
next_cell:
INX
INX
INX
INX
INX
INX
INX
INX
BNE fill_row
JMP loop
exit: RTS