src/mess/machine/mbee.c
| r9319 | r9320 | |
| 205 | 205 | //wd17xx_set_complete_command_delay(mbee_fdc, 50); /* default is 12 usec if not set */ |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | MACHINE_RESET( mbee64 ) |
| 209 | { |
| 210 | memory_set_bank(machine, "boot", 1); |
| 211 | memory_set_bank(machine, "bankl", 1); |
| 212 | memory_set_bank(machine, "bankh", 1); |
| 213 | mbee_z80pio = machine->device("z80pio"); |
| 214 | mbee_speaker = machine->device("speaker"); |
| 215 | mbee_cassette = machine->device("cassette"); |
| 216 | mbee_printer = machine->device("centronics"); |
| 217 | mbee_fdc = machine->device("wd179x"); |
| 218 | mbee_rtc = machine->device<mc146818_device>("rtc"); |
| 219 | } |
| 208 | 220 | |
| 209 | 221 | INTERRUPT_GEN( mbee_interrupt ) |
| 210 | 222 | { |
| 223 | // Due to the uncertainly and hackage here, this is commented out for now - Robbbert - 05-Oct-2010 |
| 224 | #if 0 |
| 225 | |
| 211 | 226 | address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 212 | | /* once per frame, pulse the PIO B bit 7 */ |
| 213 | | // mbee_vsync = 1; |
| 227 | /* once per frame, pulse the PIO B bit 7 - it is in the schematic as an option, |
| 228 | but need to find out what it does */ |
| 229 | mbee_vsync = 1; |
| 214 | 230 | |
| 215 | 231 | /* The printer status connects to the pio ASTB pin, and the printer changing to not |
| 216 | 232 | busy should signal an interrupt routine at B61C, (next line) but this doesn't work. |
| r9319 | r9320 | |
| 219 | 235 | z80pio_astb_w( mbee_z80pio, centronics_busy_r(mbee_printer)); /* signal int when not busy (L->H) */ |
| 220 | 236 | |
| 221 | 237 | space->write_byte(0x109, centronics_busy_r(mbee_printer)); |
| 238 | |
| 239 | /* But it would break any program loaded to that area of memory, such as CP/M programs */ |
| 240 | #endif |
| 222 | 241 | } |
| 223 | 242 | |
| 224 | 243 | DRIVER_INIT( mbee ) |
| r9319 | r9320 | |
| 313 | 332 | DRIVER_INIT( mbee64 ) |
| 314 | 333 | { |
| 315 | 334 | UINT8 *RAM = memory_region(machine, "maincpu"); |
| 316 | | memory_configure_bank(machine, "boot", 0, 2, &RAM[0x0000], 0xe000); |
| 317 | | mbee_size = 0xe000; |
| 335 | memory_configure_bank(machine, "boot", 0, 1, &RAM[0x0000], 0x0000); |
| 336 | memory_configure_bank(machine, "bankl", 0, 1, &RAM[0x1000], 0x0000); |
| 337 | memory_configure_bank(machine, "bankl", 1, 1, &RAM[0x9000], 0x0000); |
| 338 | memory_configure_bank(machine, "bankh", 0, 1, &RAM[0x8000], 0x0000); |
| 318 | 339 | |
| 340 | RAM = memory_region(machine, "bootrom"); |
| 341 | memory_configure_bank(machine, "bankh", 1, 1, &RAM[0x0000], 0x0000); |
| 342 | memory_configure_bank(machine, "boot", 1, 1, &RAM[0x0000], 0x0000); |
| 343 | |
| 344 | mbee_size = 0xf000; |
| 345 | |
| 319 | 346 | timer_pulse(machine, ATTOTIME_IN_HZ(1),NULL,0,mbee_rtc_irq); /* timer for rtc */ |
| 320 | 347 | } |
| 321 | 348 | |
src/mess/video/mbee.c
| r9319 | r9320 | |
| 178 | 178 | memory_set_bank(space->machine, "basic", (data & 0x20) ? 1 : 0); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | WRITE8_HANDLER( mbee64_50_w ) |
| 182 | { |
| 183 | /* This does a number of other things in the 128k (and later) models - not sure if |
| 184 | they exist in the 64k */ |
| 185 | |
| 186 | if (data & 4) |
| 187 | { |
| 188 | memory_set_bank(space->machine, "boot", 0); |
| 189 | memory_set_bank(space->machine, "bankl", 0); |
| 190 | memory_set_bank(space->machine, "bankh", 0); |
| 191 | } |
| 192 | else |
| 193 | { |
| 194 | memory_set_bank(space->machine, "bankl", 1); |
| 195 | memory_set_bank(space->machine, "bankh", 1); |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | |
| 181 | 200 | READ8_HANDLER( mbeeppc_low_r ) |
| 182 | 201 | { |
| 183 | 202 | if (mbee_1c & 16) |
| r9319 | r9320 | |
| 261 | 280 | if( data ) |
| 262 | 281 | { |
| 263 | 282 | crt.lpen_lo = offs; |
| 264 | | crt.lpen_hi = offs >> 8; |
| 283 | crt.lpen_hi = (offs >> 8) & 0x3f; |
| 265 | 284 | crt.lpen_strobe = 1; |
| 266 | 285 | } |
| 267 | 286 | } |
src/mess/drivers/mbee.c
| r9319 | r9320 | |
| 63 | 63 | |
| 64 | 64 | TODO: |
| 65 | 65 | - Printer is working, but with improper code. This needs to be fixed. |
| 66 | 05-Oct-2010 printer hack commented out for now.. it doesn't work any more |
| 66 | 67 | - Roms for mbeepc to be checked (I think they are correct) |
| 67 | 68 | - Fix Paste (it loses most of the characters) |
| 68 | 69 | - Fix the rtc (it's in as per the manuals, but it is completely ignored) |
| r9319 | r9320 | |
| 153 | 154 | |
| 154 | 155 | static ADDRESS_MAP_START(mbee64_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 155 | 156 | AM_RANGE(0x0000, 0x0fff) AM_RAMBANK("boot") |
| 156 | | AM_RANGE(0x1000, 0xdfff) AM_RAM |
| 157 | | AM_RANGE(0xe000, 0xefff) AM_ROM |
| 157 | AM_RANGE(0x1000, 0x7fff) AM_RAMBANK("bankl") |
| 158 | AM_RANGE(0x8000, 0xefff) AM_RAMBANK("bankh") |
| 158 | 159 | AM_RANGE(0xf000, 0xf7ff) AM_READWRITE(mbee_low_r, mbee_low_w) |
| 159 | 160 | AM_RANGE(0xf800, 0xffff) AM_READWRITE(mbeeic_high_r, mbeeic_high_w) |
| 160 | 161 | ADDRESS_MAP_END |
| r9319 | r9320 | |
| 255 | 256 | AM_RANGE(0x0d, 0x0d) AM_MIRROR(0x10) AM_READWRITE(m6545_data_r, m6545_data_w) |
| 256 | 257 | AM_RANGE(0x44, 0x47) AM_DEVREADWRITE("wd179x", wd17xx_r, wd17xx_w) |
| 257 | 258 | AM_RANGE(0x48, 0x48) AM_READWRITE(mbee_fdc_status_r, mbee_fdc_motor_w) |
| 259 | AM_RANGE(0x50, 0x50) AM_WRITE(mbee64_50_w) |
| 258 | 260 | ADDRESS_MAP_END |
| 259 | 261 | |
| 260 | 262 | static INPUT_PORTS_START( mbee ) |
| r9319 | r9320 | |
| 545 | 547 | MDRV_CPU_MODIFY( "maincpu" ) |
| 546 | 548 | MDRV_CPU_PROGRAM_MAP(mbee64_mem) |
| 547 | 549 | MDRV_CPU_IO_MAP(mbee64_io) |
| 550 | MDRV_MACHINE_RESET( mbee64 ) |
| 548 | 551 | MDRV_WD179X_ADD("wd179x", mbee_wd17xx_interface ) |
| 549 | 552 | MDRV_FLOPPY_2_DRIVES_ADD(mbee_floppy_config) |
| 550 | 553 | MACHINE_CONFIG_END |
| r9319 | r9320 | |
| 777 | 780 | |
| 778 | 781 | ROM_START( mbee64 ) |
| 779 | 782 | ROM_REGION(0x10000,"maincpu", ROMREGION_ERASEFF) |
| 780 | | ROM_LOAD("rom1.bin", 0xdf00, 0x2000, CRC(995c53db) SHA1(46e1a5cfd5795b8cf528bacf9dc79398ff7d64af) ) |
| 781 | 783 | |
| 784 | ROM_REGION(0x2000,"bootrom", ROMREGION_ERASEFF) |
| 785 | ROM_LOAD("rom1.bin", 0x0000, 0x2000, CRC(995c53db) SHA1(46e1a5cfd5795b8cf528bacf9dc79398ff7d64af) ) |
| 786 | |
| 782 | 787 | ROM_REGION(0x2000, "gfx", 0) |
| 783 | 788 | ROM_LOAD("charrom.bin", 0x1000, 0x1000, CRC(1f9fcee4) SHA1(e57ac94e03638075dde68a0a8c834a4f84ba47b0) ) |
| 784 | 789 | ROM_RELOAD( 0x0000, 0x1000 ) |