#include "mouse.h" #include #include "mouse-rom.h" Mouse::Mouse() { } Mouse::~Mouse() { } bool Mouse::Serialize(int8_t fd) { return true; } bool Mouse::Deserialize(int8_t fd) { return true; } void Mouse::Reset() { } uint8_t Mouse::readSwitches(uint8_t s) { return 0xFF; } void Mouse::writeSwitches(uint8_t s, uint8_t v) { printf("unknown switch 0x%X\n", s); } void Mouse::loadROM(uint8_t *toWhere) { uint8_t rom[256] = { 0x2c, 0x58, 0xff, 0x70, 0x1B, 0x38, 0x90, 0x18, 0xb8, 0x50, 0x15, 0x01, 0x20, 0xae, 0xae, 0xae, 0xae, 0x00, 0x6d, 0x75, 0x8e, 0x9f, 0xa4, 0x86, 0xa9, 0x97, 0xae, 0xae, 0xae, 0xae, 0xae, 0xae, 0x48, 0x98, 0x48, 0x8a, 0x48, 0x08, 0x78, 0x20, 0x58, 0xFF, 0xBA, 0xBD, 0x00, 0x01, 0xAA, 0x0A, 0x0A, 0x0A, 0x0A, 0xA8, 0x28, 0x50, 0x0F, 0xA5, 0x38, 0xd0, 0x0d, 0x8a, 0x45, 0x39, 0xd0, 0x08, 0xa9, 0x05, 0x85, 0x38, 0xd0, 0x0b, 0xb0, 0x09, 0x68, 0xaa, 0x68, 0xea, 0x68, 0x99, 0x80, 0xc0, 0x60, 0x99, 0x81, 0xc0, 0x68, 0xbd, 0x38, 0x06, 0xaa, 0x68, 0xa8, 0x68, 0xbd, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x10, 0xb0, 0x3f, 0x99, 0x82, 0xc0, 0x60, 0x48, 0x18, 0x90, 0x39, 0x99, 0x83, 0xc0, 0xbd, 0xb8, 0x06, 0x29, 0x0E, 0xD0, 0x01, 0x38, 0x68, 0x60, 0xc9, 0x02, 0xb0, 0x26, 0x99, 0x83, 0xc0, 0x60, 0xa9, 0x04, 0x99, 0x83, 0xc0, 0x18, 0xea, 0xea, 0x60, 0xea, 0xa9, 0x02, 0x99, 0x83, 0xc0, 0x18, 0x60, 0xea, 0xa9, 0x05, 0xd0, 0xf6, 0xea, 0xa9, 0x06, 0xd0, 0xf1, 0xea, 0xa9, 0x07, 0xd0, 0xec, 0xa2, 0x03, 0x38, 0x60, 0x08, 0xa5, 0x00, 0x48, 0xa9, 0x60, 0x85, 0x00, 0x78, 0x20, 0x00, 0x00, 0xba, 0x68, 0x85, 0x00, 0xbd, 0x00, 0x01, 0x28, 0xaa, 0x0a, 0x0a, 0x0a, 0x0a, 0xa8, 0xa9, 0x03, 0x18, 0x90, 0xa8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd6, 0xff, 0xff, 0xff, 0x01 }; memcpy(toWhere, rom, 256); } bool Mouse::hasExtendedRom() { return true; } void Mouse::loadExtendedRom(uint8_t *toWhere, uint16_t byteOffset) { printf("loading extended rom for the mouse\n"); for (int i=0; i<256; i++) { toWhere[i] = romData[i + byteOffset]; } }