src/mess/drivers/mikromik.c
| r5971 | r5972 | |
| 17 | 17 | |
| 18 | 18 | TODO: |
| 19 | 19 | |
| 20 | | - MBASIC cannot load program from floppy (does not use DMA transfer) |
| 21 | | - cursor not visible |
| 20 | - NEC uPD7220 GDC (convert Intel 82720 from compis.c into a device) |
| 22 | 21 | - accurate video timing |
| 23 | | - floppy RECALL |
| 24 | | - floppy TC only during DACK |
| 22 | - floppy DRQ during RECALL = 0 |
| 23 | - write floppy TC only during DACK |
| 25 | 24 | - PCB layout |
| 26 | | - NEC uPD7220 GDC (convert Intel 82720 from compis.c into a device) |
| 27 | 25 | - NEC uPD7201 MPSC |
| 28 | 26 | |
| 29 | 27 | */ |
| r5971 | r5972 | |
| 258 | 256 | |
| 259 | 257 | /* Video */ |
| 260 | 258 | |
| 259 | static PALETTE_INIT( mm1 ) |
| 260 | { |
| 261 | palette_set_color(machine, 0, RGB_BLACK); /* black */ |
| 262 | palette_set_color_rgb(machine, 1, 0x00, 0xc0, 0x00); /* green */ |
| 263 | palette_set_color_rgb(machine, 2, 0x00, 0xff, 0x00); /* bright green */ |
| 264 | } |
| 265 | |
| 261 | 266 | static WRITE_LINE_DEVICE_HANDLER( drqcrt_w ) |
| 262 | 267 | { |
| 263 | 268 | mm1_state *driver_state = device->machine->driver_data; |
| r5971 | r5972 | |
| 269 | 274 | { |
| 270 | 275 | mm1_state *state = device->machine->driver_data; |
| 271 | 276 | |
| 272 | | UINT8 data = state->char_rom[(charcode << 4) | linecount]; |
| 277 | UINT8 romdata = state->char_rom[(charcode << 4) | linecount]; |
| 278 | |
| 279 | int d0 = BIT(romdata, 0); |
| 280 | int d7 = BIT(romdata, 7); |
| 281 | int gpa0 = BIT(gpa, 0); |
| 282 | int llen = state->llen; |
| 273 | 283 | int i; |
| 284 | |
| 285 | UINT8 data = (romdata << 1) | (d7 & d0); |
| 274 | 286 | |
| 275 | 287 | for (i = 0; i < 8; i++) |
| 276 | 288 | { |
| 277 | | *BITMAP_ADDR16(tmpbitmap, y, x + i) = BIT(data, i); |
| 289 | int qh = BIT(data, i); |
| 290 | int video_in = ((((d7 & llen) | !vsp) & !gpa0) & qh) | lten; |
| 291 | int compl_in = rvv; |
| 292 | int hlt_in = hlgt; |
| 293 | |
| 294 | int color = hlt_in ? 2 : (video_in ^ compl_in); |
| 295 | |
| 296 | *BITMAP_ADDR16(tmpbitmap, y, x + i) = color; |
| 278 | 297 | } |
| 279 | 298 | } |
| 280 | 299 | |
| r5971 | r5972 | |
| 733 | 752 | //MDRV_SCREEN_RAW_PARAMS(XTAL_18_720MHz, ...) |
| 734 | 753 | |
| 735 | 754 | MDRV_GFXDECODE(mm1) |
| 736 | | MDRV_PALETTE_LENGTH(2) |
| 737 | | MDRV_PALETTE_INIT(monochrome_green) |
| 755 | MDRV_PALETTE_LENGTH(3) |
| 756 | MDRV_PALETTE_INIT(mm1) |
| 738 | 757 | |
| 739 | 758 | MDRV_VIDEO_START(mm1) |
| 740 | 759 | MDRV_VIDEO_UPDATE(mm1) |