MOUSE2Go

6502 computer emulated by an Arduino

Start Arduino MOUSE Examples View on GitHub Download as .zip Download as .tar.gz

MOUSE2Go MOUSE System

The folder “M-OS-6502” contains the 6502 part of this project. The software ist written in assembler and can be assembled with the ophis assembler (https://michaelcmartin.github.io/Ophis/)

Features

Get started

See Arduino Software how to flash the emulator on you Arduino board.

There’s now a Youtube video about how to get started: to the video

After the firmware is written to the Arduino, just connect with a serial terminal program to the Arduino board using the serrings 9600 baud, 8N1

The connection should cause a reset on the Arduino and you should get the following output:

MOUSE 65C02 micro computer (c) 2017
M-OS V0.3
READY.
MOUSE MON V 0.8


>

Be sure to set you terminal programm to send only a CR (carriage return) for a line end and not CR+LF (carriage return plus line feed)

You can now type “h” and hit enter to get a little help for the commands that are supported by the monitor program.

h OK
commands:
a <addr> - start assembler at address
c - start microchess
d <addr> - disassemble from address
f <addr>:<addr> %val - fill memory with %val
g <addr> - jump to <addr>
h - this help
i <addr> - input <addr> input data to memory '.' ends the input
m <addr> %cols %rows - dump memory from address
o <addr>:<addr> - output memory range
r - jump to reset vector
s <addr> - show one byte in hex and binary
v - start VTL2 language
 <addr> - 16bit address, %xx - 8 bit value
>

See Examples for some detailes of how to use the system.

Building the ROM image

There’s a small shellscript that runs the assembler with all needed options.

Testing the ROM image

Using the lastet version of py65mon (https://github.com/mnaberez/py65) you can run the generated rom image also on your local machine with

py65mon -i fff9 -o fff8 -m 6502 -r MOUSE_ROM.bin

MOUSE2Go Memorymap

Basic memory regions

except $7FFC to $7FFF, see “Soft IRQ and NMI vectors”

Special addresses

Some address spaces (zeropage) are used by the assembler, disassembler, chess etc. but only if the programm is executed

Soft IRQ and NMI vectors

The MIOS kernel has own NMI and IRQ functions that basically do a JMP($7FFC) and JPM($7FFE). Placing the addresses of you own fuction at the soft vectors, they are executed on any interrupt.

The reset function sets the vectors to an RTI in ROM on any reset or power on.

Addresses used by MIOS routines

if your own programm uses routines of the MIOS (Minimal Input Output System) you shoul take care for the following addresses

MIOS jump table

To prevent problems with programs using MIOS routines you should only call the routines with a JSR to the jump table entry instead of calling the funtion directly from its memory location. During further development these locations may change and the jump table will be fix.