104 #define EP_KBDM_SCAN(sc,resval) ((kbd_matrix[(sc) >> 4] & (1 << ((sc) & 15))) ? 0 : (resval))
107 #define PRIMOEMU_HOTKEY_RESET 0x47
129 static int primo_scan_key (
int scan )
132 if (scan == 0xFF)
return 0;
145 #define LD1HI_PV1 (((PRIMO_VID_SEG << 6) + 0x28) & 0xFF)
146 #define LD1HI_PV0 (((PRIMO_VID_SEG << 6) + 0x08) & 0xFF)
153 ports[0xA8] = ports[0xAC] = (
data & 16) ? 63 : 0;
161 for (a = 0; a < 0xFC; a++)
163 DEBUG(
"PRIMO: found Primo ROM in segment %02Xh, good" NL, a);
166 DEBUG(
"PRIMO: not found Primo ROM in the loaded ROMs ..." NL);
171 static const Uint8 primo_lpt[] = {
174 256-192,14|16, 15, 47, 0,0,0,0, 1,0xFF,0,0,0,0,0,0,
176 256-47, 2 | 128, 6, 63, 0,0,0,0, 0,0,0,0,0,0,0,0,
178 256-3 , 0, 63, 0, 0,0,0,0, 0,0,0,0,0,0,0,0,
179 256-2 , 0, 6, 63, 0,0,0,0, 0,0,0,0,0,0,0,0,
180 256-1 , 0, 63, 32, 0,0,0,0, 0,0,0,0,0,0,0,0,
181 256-19, 2, 6, 63, 0,0,0,0, 0,0,0,0,0,0,0,0,
183 256-48, 3, 6, 63, 0,0,0,0, 0,0,0,0,0,0,0,0
185 #define MEMORY_BACKUP_SIZE (0xC000 + sizeof primo_lpt)
187 static Uint8 ports_backup[0x100];
195 ports_backup[0x83] |= 128 | 64;
196 for (a = 0x80; a < 0x84; a++)
198 for (a = 0xA0; a < 0xB5; a++)
216 memcpy(ports_backup, ports, 0x100);
231 for (a = 0xA8; a < 0xB0; a++)