src/mess/video/mbee.c
| r1979 | r1980 | |
| 42 | 42 | static int off_x = 0; |
| 43 | 43 | static int off_y = 0; |
| 44 | 44 | static int framecnt = 0; |
| 45 | | static int update_all = 0; |
| 46 | 45 | static int m6545_color_bank = 0; |
| 47 | 46 | static int m6545_video_bank = 0; |
| 48 | 47 | static int mbee_pcg_color_latch = 0; |
| r1979 | r1980 | |
| 372 | 371 | crt.cursor_bottom = data; |
| 373 | 372 | break; |
| 374 | 373 | case 12: |
| 375 | | data &= 63; |
| 374 | data &= 0x3f; |
| 376 | 375 | if( crt.screen_address_hi == data ) |
| 377 | 376 | break; |
| 378 | | update_all = 1; |
| 379 | 377 | crt.screen_address_hi = data; |
| 380 | 378 | addr = 0x17000+((data & 32) << 6); |
| 381 | 379 | memcpy(memory_region(REGION_CPU1)+0xf000, memory_region(REGION_CPU1)+addr, 0x800); |
| r1979 | r1980 | |
| 383 | 381 | decodechar(machine->gfx[0],i, pcgram); |
| 384 | 382 | break; |
| 385 | 383 | case 13: |
| 386 | | if( crt.screen_address_lo == data ) |
| 387 | | break; |
| 388 | | update_all = 1; |
| 389 | 384 | crt.screen_address_lo = data; |
| 390 | 385 | break; |
| 391 | 386 | case 14: |
| 392 | | data &= 63; |
| 393 | | crt.cursor_address_hi = data; |
| 387 | crt.cursor_address_hi = data & 0x3f; |
| 394 | 388 | break; |
| 395 | 389 | case 15: |
| 396 | 390 | crt.cursor_address_lo = data; |
| r1979 | r1980 | |
| 444 | 438 | framecnt++; |
| 445 | 439 | |
| 446 | 440 | cursor = (crt.cursor_address_hi << 8) | crt.cursor_address_lo; |
| 447 | | screen_ = ((crt.screen_address_hi & 7) << 8) | crt.screen_address_lo; |
| 448 | | for( offs = screen_; offs < crt.horizontal_displayed * crt.vertical_displayed + screen_; offs++ ) |
| 441 | screen_ = (crt.screen_address_hi << 8) | crt.screen_address_lo; |
| 442 | |
| 443 | for (offs = 0; offs < crt.horizontal_displayed * crt.vertical_displayed; offs++) |
| 449 | 444 | { |
| 450 | | int sx, sy, code; |
| 451 | | sy = off_y - 9 + ((offs - screen_) / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 452 | | sx = (off_x + 3 + ((offs - screen_) % crt.horizontal_displayed)) << 3; |
| 453 | | code = videoram[offs]; |
| 445 | int mem = ((offs + screen_) & 0x7ff); |
| 446 | int sy = off_y - 9 + (offs / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 447 | int sx = (off_x + 3 + (offs % crt.horizontal_displayed)) << 3; |
| 448 | int code = videoram[mem]; |
| 454 | 449 | drawgfx( bitmap,machine->gfx[0],code,0,0,0,sx,sy, |
| 455 | 450 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 456 | 451 | |
| 457 | | if( offs == cursor && (crt.cursor_top & 0x60) != 0x20 ) |
| 452 | if( mem == cursor && (crt.cursor_top & 0x60) != 0x20 ) |
| 458 | 453 | { |
| 459 | 454 | if( (crt.cursor_top & 0x60) == 0x60 || (framecnt & 16) == 0 ) |
| 460 | 455 | { |
| r1979 | r1980 | |
| 469 | 464 | } |
| 470 | 465 | } |
| 471 | 466 | } |
| 467 | |
| 472 | 468 | return 0; |
| 473 | 469 | } |
| 474 | 470 | |
| r1979 | r1980 | |
| 482 | 478 | framecnt++; |
| 483 | 479 | |
| 484 | 480 | cursor = (crt.cursor_address_hi << 8) | crt.cursor_address_lo; |
| 485 | | screen_ = ((crt.screen_address_hi & 7) << 8) | crt.screen_address_lo; |
| 486 | | for( offs = screen_; offs < crt.horizontal_displayed * crt.vertical_displayed + screen_; offs++ ) |
| 481 | screen_ = (crt.screen_address_hi << 8) | crt.screen_address_lo; |
| 482 | |
| 483 | for (offs = 0; offs < crt.horizontal_displayed * crt.vertical_displayed; offs++) |
| 487 | 484 | { |
| 488 | | int sx, sy, code, color; |
| 489 | | sy = off_y + ((offs - screen_) / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 490 | | sx = (off_x + ((offs - screen_) % crt.horizontal_displayed)) << 3; |
| 491 | | code = videoram[offs]; |
| 492 | | color = colorram[offs]; |
| 485 | int mem = ((offs + screen_) & 0x7ff); |
| 486 | int sy = off_y + (offs / crt.horizontal_displayed) * (crt.scan_lines + 1); |
| 487 | int sx = (off_x + (offs % crt.horizontal_displayed)) << 3; |
| 488 | int code = videoram[mem]; |
| 489 | int color = colorram[mem]; |
| 493 | 490 | drawgfx( bitmap,machine->gfx[0],code,color,0,0,sx,sy, |
| 494 | 491 | &machine->screen[0].visarea,TRANSPARENCY_NONE,0); |
| 495 | 492 | |
src/mess/drivers/mbee.c
| r1979 | r1980 | |
| 6 | 6 | |
| 7 | 7 | Brett Selwood, Andrew Davies (technical assistance) |
| 8 | 8 | |
| 9 | | Microbee memory map (preliminary) |
| 9 | Microbee Standard / Plus memory map |
| 10 | 10 | |
| 11 | 11 | 0000-7FFF RAM |
| 12 | | 8000-BFFF SYSTEM roms (bas510a.rom, bas510b.rom) |
| 12 | 8000-BFFF SYSTEM roms |
| 13 | 13 | C000-DFFF Edasm or WBee (edasm.rom or wbeee12.rom, optional) |
| 14 | | E000-EFFF Telcom (tecl321.rom; optional) |
| 14 | E000-EFFF Telcom 1.2 (netrom.ic34; optional) |
| 15 | 15 | F000-F7FF Video RAM |
| 16 | 16 | F800-FFFF PCG RAM (graphics) |
| 17 | 17 | |
| r1979 | r1980 | |
| 32 | 32 | F800-FFFF PCG RAM (graphics), Colour RAM (banked) |
| 33 | 33 | |
| 34 | 34 | Microbee 32 came in three versions: |
| 35 | | IE: features a terminal emulator mapped at $E000 |
| 36 | | (maybe there is a keyword to activate it?) |
| 35 | IC: features a terminal emulator mapped at $E000 - type NET to run |
| 37 | 36 | |
| 38 | 37 | PC: features an editor/assembler - type EDASM to run |
| 39 | 38 | |
| r1979 | r1980 | |
| 93 | 92 | ADDRESS_MAP_FLAGS( AMEF_ABITS(8) ) |
| 94 | 93 | AM_RANGE(0x00, 0x03) AM_MIRROR(0x10) AM_READWRITE(mbee_pio_r, mbee_pio_w) |
| 95 | 94 | AM_RANGE(0x08, 0x08) AM_MIRROR(0x10) AM_READWRITE(mbee_pcg_color_latch_r, mbee_pcg_color_latch_w) |
| 96 | | // AM_RANGE(0x09, 0x09) AM_MIRROR(0x10) Listed as "Colour Wait Off" but doesn't appear in the schematics |
| 95 | // AM_RANGE(0x09, 0x09) AM_MIRROR(0x10) Listed as "Colour Wait Off or USART 2651" but doesn't appear in the schematics |
| 97 | 96 | AM_RANGE(0x0a, 0x0a) AM_MIRROR(0x10) AM_READWRITE(mbee_color_bank_r, mbee_color_bank_w) |
| 98 | 97 | AM_RANGE(0x0b, 0x0b) AM_MIRROR(0x10) AM_READWRITE(mbee_video_bank_r, mbee_video_bank_w) |
| 99 | 98 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0x10) AM_READWRITE(m6545_status_r, m6545_index_w) |
| r1979 | r1980 | |
| 217 | 216 | }; |
| 218 | 217 | |
| 219 | 218 | static GFXDECODE_START( mbee ) |
| 219 | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 1 ) |
| 220 | GFXDECODE_END |
| 221 | |
| 222 | static GFXDECODE_START( mbeeic ) |
| 220 | 223 | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 ) |
| 221 | 224 | GFXDECODE_END |
| 222 | 225 | |
| r1979 | r1980 | |
| 324 | 327 | MDRV_CPU_IO_MAP(mbeeic_ports, 0) |
| 325 | 328 | MDRV_CPU_CONFIG(mbee_daisy_chain) |
| 326 | 329 | MDRV_CPU_VBLANK_INT("main", mbee_interrupt) |
| 327 | | MDRV_INTERLEAVE(1) |
| 328 | 330 | |
| 329 | 331 | MDRV_MACHINE_RESET( mbee ) |
| 330 | 332 | MDRV_MACHINE_START( mbee ) |
| 331 | 333 | |
| 332 | | MDRV_GFXDECODE(mbee) |
| 334 | MDRV_GFXDECODE(mbeeic) |
| 333 | 335 | MDRV_SCREEN_ADD("main", RASTER) |
| 334 | 336 | MDRV_SCREEN_REFRESH_RATE(50) |
| 335 | 337 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(250)) /* not accurate */ |
| r1979 | r1980 | |
| 371 | 373 | |
| 372 | 374 | ROM_START( mbee ) |
| 373 | 375 | ROM_REGION(0x18000,REGION_CPU1,0) |
| 374 | | ROM_LOAD("bas510a.ic25", 0x8000, 0x1000, CRC(2ca47c36) SHA1(f36fd0afb3f1df26edc67919e78000b762b6cbcb) ) |
| 375 | | ROM_LOAD("bas510b.ic27", 0x9000, 0x1000, CRC(a07a0c51) SHA1(dcbdd9df78b4b6b2972de2e4050dabb8ae9c3f5a) ) |
| 376 | | ROM_LOAD("bas510c.ic28", 0xa000, 0x1000, CRC(906ac00f) SHA1(9b46458e5755e2c16cdb191a6a70df6de9fe0271) ) |
| 377 | | ROM_LOAD("bas510d.ic30", 0xb000, 0x1000, CRC(61727323) SHA1(c0fea9fd0e25beb9faa7424db8efd07cf8d26c1b) ) |
| 378 | | ROM_LOAD("edasma.ic31", 0xc000, 0x1000, CRC(120c3dea) SHA1(32c9bb6e54dd50d5218bb43cc921885a0307161d) ) |
| 379 | | ROM_LOAD("edasmb.ic33", 0xd000, 0x1000, CRC(a23bf3c8) SHA1(73a57c2800a1c744b527d0440b170b8b03351753) ) |
| 380 | | ROM_LOAD("charrom.ic13", 0xf000, 0x0800, CRC(b149737b) SHA1(a3cd4f5d0d3c71137cd1f0f650db83333a2e3597) ) |
| 376 | ROM_LOAD("bas510a.ic25", 0x8000, 0x1000, CRC(2ca47c36) SHA1(f36fd0afb3f1df26edc67919e78000b762b6cbcb) ) |
| 377 | ROM_LOAD("bas510b.ic27", 0x9000, 0x1000, CRC(a07a0c51) SHA1(dcbdd9df78b4b6b2972de2e4050dabb8ae9c3f5a) ) |
| 378 | ROM_LOAD("bas510c.ic28", 0xa000, 0x1000, CRC(906ac00f) SHA1(9b46458e5755e2c16cdb191a6a70df6de9fe0271) ) |
| 379 | ROM_LOAD("bas510d.ic30", 0xb000, 0x1000, CRC(61727323) SHA1(c0fea9fd0e25beb9faa7424db8efd07cf8d26c1b) ) |
| 380 | ROM_LOAD("edasma.ic31", 0xc000, 0x1000, CRC(120c3dea) SHA1(32c9bb6e54dd50d5218bb43cc921885a0307161d) ) |
| 381 | ROM_LOAD("edasmb.ic33", 0xd000, 0x1000, CRC(a23bf3c8) SHA1(73a57c2800a1c744b527d0440b170b8b03351753) ) |
| 382 | ROM_LOAD("netrom.ic34", 0xe000, 0x1000, CRC(0231bda3) SHA1(be7b32499034f985cc8f7865f2bc2b78c485585c) ) |
| 383 | ROM_LOAD("charrom.ic13", 0xf000, 0x0800, CRC(b149737b) SHA1(a3cd4f5d0d3c71137cd1f0f650db83333a2e3597) ) |
| 381 | 384 | ROM_RELOAD( 0x17000, 0x0800 ) |
| 385 | ROM_RELOAD( 0x17800, 0x0800 ) |
| 382 | 386 | ROM_END |
| 383 | 387 | |
| 384 | 388 | ROM_START( mbeeic ) |