PG_6502 is a quirky 6502 CPU emulator built entirely in PostgreSQL. CPU registers are stored in a single-row table, 64K bytes of memory are represented as individual table rows, and each opcode is implemented as a stored procedure. For example, the LDA immediate opcode (0xA9) is handled by a stored procedure that reads the next byte, increments the program counter, sets the accumulator, and updates flags — all via SQL operations.

1m read timeFrom hackaday.com
Post cover image

Sort: