OK64 : The OK 8-bit computer.

Do you know what the best part of creating our very own computer is? No nosy poignant ambitious pedantic opinionated brigands of cacophonic fellow nerds who constantly tell you what is possible or not, or the best way, or fastest, or what has been done before, or that this can’t be done, or this is stupid, or that you’re stupid, or change the processor, or it needs BASIC, or does it run “Farcry”, more ram, less ram, bigger better smaller.

On august 23d 2019 I decided to start making my own “fantasy” computer, based on my experiences with the excellent Pico-8. I had just finished creating a blockbuster demo for the system (will be released during september’s Flashparty in Argentina), but was somewhat still unsettled by the fact that the fantasy console.. doesn’t have a CPU. While it does have RAM – the program code isn’t stored anywhere on the system, and the LUA script is executed internally and with arbitrary speed and size constraints.

So after having experimented for a couple of days, I had a rudimentary emulator for a “fantasy” computer that uses an underpowered *real* CPU with *real* constraints (and a custom overpowered video chip) that can be programmed for using TRSE. Here’s the deal:

  • MOS 6502 processor clocked in at 0.985 mhz (PAL)
  • SID chip (registers at $FF20)
  • OKVC (OK Video chip) registers at $F000-$FFF0)
  • 64K of program memory (pram)
  • 1mb of video memory (vram), accessible through pram registers
  • 256×256 8-bit VGA output (custom palette of 24-bit RGB 256 colors)
  • The OKVC has several built-in methods for fast drawing of primitives
    • Draw lines
    • Pixels
    • Circles (filled)
    • Blitting (copying) of image data within vram, acts as sprites
    • Clearing
  • Combining the 0.985 mhz MOS 6502 with a very fast video chip will probably yield unexpected results!
  • I’m not a hardware wiz, but I’m hoping that this computer could potentially be built IRL

Currently working implementing the basics of the emulator + adding support for built-in functions in TRSE. Here’s a video of some 8-bit output, all running on a *real* 6502 with a *real* SID chip (and a “fake” video chip):

An early example of the OK 64 in action. Here, a TRSE Pascal program is being compiled to an assembler proram that copies an image to the screen + draws som circles + plays a SID file is presented. 78% of the 6502 CPU is used, but the program is not optimized. All rendering of objects is performed by the OKVC.

The roadmap for OK64

For now, I’m just playing around with the emulator, changing the hardware on a whim whenever I feel like it. But hopefully, within a couple of weeks/months, I’ll have proper release of the emulator, as well as full support in TRSE for this marvel of a machine.