Shop OBEX P1 Docs P2 Docs Learn Events
COMPUKIT UK101 (6502) Emulator — Parallax Forums

COMPUKIT UK101 (6502) Emulator

Hello,

With all that Z80 stuff done recently, I realized I left my 6502 emulator alone for too long, so after some researches for a simple 6502-based computer, aside from the Commodore systems, I found this nice computer kit from 1979, the COMPUKIT UK101.

In short it runs a MOS 6502 processor at 1MHz, 8k RAM, 1k memory mapped video display, 2K character generator ROM, 8k Microsoft BASIC ROM and a 2k monitor ROM.

The video display is rather unusual. It is mapped into 1k memory as 64 colums by 16 rows, however due do the TV screen limits, only about 48 columns are visible (a bit less on actual TVs) and the bios rom takes this into account automatically. The original computer had RF TV-out, but this emulator outputs an SVGA signal at 800x600 to display the full 48 columns by 16 rows.

The PS/2 keyboard is mapped exactly like the original, except the reset buttons that are mapped to the WINL and WINR buttons (press both to reset).

It also has an ACIA serial port to load and save basic programs. The port runs at 300 baud, same as the original, so you need a terminal program that supports that slow speed.

The attached archive includes the source code, all ROMs including a selection of three monitor ROMs, and some basic examples to upload with the play.py Python program or typed directly on the keyboard.

Manuals can be found here:
http://6502.org/documents/microcomputers/compukit-uk101/

Enjoy!

Comments

  • pik33pik33 Posts: 2,366

    I need a 6502 for the SID player. I planned to write one but here it is :) , except (1) it has to be extracted from the emu (2) "illegal instruction" have to be added: SID files, which are in fact 6502 programs, often use them.

  • maccamacca Posts: 780
    edited 2022-03-19 18:05

    @pik33 said:
    I need a 6502 for the SID player. I planned to write one but here it is :) , except (1) it has to be extracted from the emu

    As you can see, the emulator is very "linear", extracting the processor code should not be much difficult, anyway, here is the original 6502 thread https://forums.parallax.com/discussion/173342/6502-cpu-emulator with the processor only.

    (2) "illegal instruction" have to be added: SID files, which are in fact 6502 programs, often use them.

    If you have the documentation for those instructions I can add them, honestly I haven't spent much time searching for undocumented 6502 instructions...

  • pik33pik33 Posts: 2,366
    edited 2022-03-19 18:32

    One of these manuals: https://www.masswerk.at/nowgobang/2021/6502-illegal-opcodes
    Another one https://www.nesdev.com/undocumented_opcodes.txt

    One of the most often used is LAX, as it saves one instruction when A and X have to be loaded with the same value

    LAX
    
        LDA oper + LDX oper
    
        M -> A -> X
        addressing  assembler   opc bytes   cycles  
        zeropage    LAX oper    A7  2   3   
        zeropage,Y  LAX oper,Y  B7  2   4   
        absolute    LAX oper    AF  3   4   
        absolut,Y   LAX oper,Y  BF  3   4*  
        (indirect,X)    LAX (oper,X)    A3  2   6   
        (indirect),Y    LAX (oper),Y    B3  2   5*  
    

    As you can see, the emulator is very "linear", extracting the processor code should not be much difficult, anyway, here is the original 6502 thread https://forums.parallax.com/discussion/173342/6502-cpu-emulator with the processor only.

    Now I remember: I forgot about this topic

Sign In or Register to comment.