src/mess/drivers/mbee.c
| r1992 | r1993 | |
| 39 | 39 | PC85: features the WordBee wordprocessor - type EDASM to run |
| 40 | 40 | (maybe the ROM was patched to use another keyword?) |
| 41 | 41 | |
| 42 | |
| 43 | These early colour computers have a PROM to create the foreground palette. |
| 44 | This PROM (82s123.ic7) is undumped, therefore the colours assigned are |
| 45 | an educated guess. Some information was obtained from magazines. |
| 46 | |
| 42 | 47 | ***************************************************************************/ |
| 43 | 48 | |
| 44 | 49 | #include "driver.h" |
| r1992 | r1993 | |
| 220 | 225 | GFXDECODE_END |
| 221 | 226 | |
| 222 | 227 | static GFXDECODE_START( mbeeic ) |
| 223 | | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 ) |
| 228 | GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 4096 ) |
| 224 | 229 | GFXDECODE_END |
| 225 | 230 | |
| 226 | | static const UINT8 mbee_palette[] = |
| 227 | | { |
| 228 | | 0x00,0x00,0x00, /* black */ |
| 229 | | 0xf0,0x00,0x00, /* red */ |
| 230 | | 0x00,0xf0,0x00, /* green */ |
| 231 | | 0xf0,0xf0,0x00, /* yellow */ |
| 232 | | 0x00,0x00,0xf0, /* blue */ |
| 233 | | 0xf0,0x00,0xf0, /* magenta */ |
| 234 | | 0x00,0xf0,0xf0, /* cyan */ |
| 235 | | 0xf0,0xf0,0xf0, /* white */ |
| 236 | | 0x08,0x08,0x08, /* black */ |
| 237 | | 0xe0,0x08,0x08, /* red */ |
| 238 | | 0x08,0xe0,0x08, /* green */ |
| 239 | | 0xe0,0xe0,0x08, /* yellow */ |
| 240 | | 0x08,0x08,0xe0, /* blue */ |
| 241 | | 0xe0,0x08,0xe0, /* magenta */ |
| 242 | | 0x08,0xe0,0xe0, /* cyan */ |
| 243 | | 0xe0,0xe0,0xe0, /* white */ |
| 244 | | 0x10,0x10,0x10, /* black */ |
| 245 | | 0xd0,0x10,0x10, /* red */ |
| 246 | | 0x10,0xd0,0x10, /* green */ |
| 247 | | 0xd0,0xd0,0x10, /* yellow */ |
| 248 | | 0x10,0x10,0xd0, /* blue */ |
| 249 | | 0xd0,0x10,0xd0, /* magenta */ |
| 250 | | 0x10,0xd0,0xd0, /* cyan */ |
| 251 | | 0xd0,0xd0,0xd0, /* white */ |
| 252 | | 0x18,0x18,0x18, /* black */ |
| 253 | | 0xe0,0x18,0x18, /* red */ |
| 254 | | 0x18,0xe0,0x18, /* green */ |
| 255 | | 0xe0,0xe0,0x18, /* yellow */ |
| 256 | | 0x18,0x18,0xe0, /* blue */ |
| 257 | | 0xe0,0x18,0xe0, /* magenta */ |
| 258 | | 0x18,0xe0,0xe0, /* cyan */ |
| 259 | | 0xe0,0xe0,0xe0 /* white */ |
| 260 | | }; |
| 261 | | |
| 262 | 231 | static PALETTE_INIT( mbee ) |
| 263 | 232 | { |
| 264 | | int i; |
| 233 | UINT16 i; |
| 265 | 234 | UINT8 r, b, g; |
| 266 | | machine->colortable = colortable_alloc(machine, 32); |
| 235 | UINT8 level[] = { 0, 0x80, 0xff }; /* off, half, full intensity */ |
| 267 | 236 | |
| 268 | | for (i = 0; i < 32; i++) |
| 269 | | { |
| 270 | | r = mbee_palette[i*3]; |
| 271 | | g = mbee_palette[i*3+1]; |
| 272 | | b = mbee_palette[i*3+2]; |
| 273 | | colortable_palette_set_color(machine->colortable,i,MAKE_RGB(r, g, b)); |
| 274 | | } |
| 237 | /* The foreground colours are determined by an undumped PROM, these are a best guess */ |
| 238 | UINT8 fgt[] = { 0, 18, 6, 24, 2, 20, 8, 26, |
| 239 | 0, 21, 15, 19, 11, 7, 5, 26, |
| 240 | 0, 9, 3, 12, 1, 10, 4, 13, |
| 241 | 0, 25, 23, 22, 17, 16, 14, 26 }; |
| 275 | 242 | |
| 276 | | for( i = 0; i < 256; i++ ) |
| 277 | | { |
| 278 | | colortable_entry_set_value(machine->colortable, i*2, i>>5); |
| 279 | | colortable_entry_set_value(machine->colortable, i*2+1, i&31); |
| 280 | | } |
| 243 | UINT8 bgt[] = { 0, 1, 3, 4, 9, 10, 12, 13, /* low intensity */ |
| 244 | 0, 2, 3, 5, 9, 11, 12, 14, /* red at full */ |
| 245 | 0, 1, 6, 7, 9, 10, 15, 16, /* green at full */ |
| 246 | 0, 2, 6, 8, 9, 11, 15, 17, /* red and green at full */ |
| 247 | 0, 1, 3, 4, 18, 19, 21, 22, /* blue at full */ |
| 248 | 0, 2, 3, 5, 18, 20, 21, 23, /* blue and red at full */ |
| 249 | 0, 1, 6, 7, 18, 19, 24, 25, /* blue and green at full */ |
| 250 | 0, 2, 6, 8, 18, 20, 24, 26 }; /* full intensity */ |
| 251 | |
| 252 | /* space for colortable */ |
| 253 | machine->colortable = colortable_alloc(machine, 27); |
| 254 | |
| 255 | /* create 27 unique colours */ |
| 256 | for (b = 0; b < 3; b++) |
| 257 | for (g = 0; g < 3; g++) |
| 258 | for (r = 0; r < 3; r++) |
| 259 | colortable_palette_set_color(machine->colortable, b*9+g*3+r, MAKE_RGB(level[r], level[g], level[b])); |
| 260 | |
| 261 | /* set up foreground palette */ |
| 262 | for (i = 1; i < 8192; i+=2) colortable_entry_set_value(machine->colortable, i, fgt[(i>>1)&0x1f]); |
| 263 | |
| 264 | /* set up background palette */ |
| 265 | for (i = 0; i < 64; i++) |
| 266 | for (r = 0; r < 32; r++) |
| 267 | colortable_entry_set_value(machine->colortable, ((i<<5)|r)<<1, bgt[i]); |
| 281 | 268 | } |
| 282 | 269 | |
| 283 | 270 | static const struct z80_irq_daisy_chain mbee_daisy_chain[] = |
| r1992 | r1993 | |
| 338 | 325 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 339 | 326 | MDRV_SCREEN_SIZE(70*8, 310) |
| 340 | 327 | MDRV_SCREEN_VISIBLE_AREA(0*8, 70*8-1, 0, 19*16-1) |
| 341 | | MDRV_PALETTE_LENGTH(256*2) |
| 328 | MDRV_PALETTE_LENGTH(4096*2) |
| 342 | 329 | MDRV_PALETTE_INIT(mbee) |
| 343 | 330 | |
| 344 | 331 | MDRV_VIDEO_START(mbeeic) |
| r1992 | r1993 | |
| 528 | 515 | CONFIG_DEVICE(mbee_quickload_getinfo) |
| 529 | 516 | SYSTEM_CONFIG_END |
| 530 | 517 | |
| 518 | |
| 531 | 519 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| 532 | 520 | COMP( 1982, mbee, 0, 0, mbee, mbee, mbee, mbee, "Applied Technology", "Microbee 16 Standard" , 0) |
| 533 | 521 | COMP( 1982, mbeeic, mbee, 0, mbeeic, mbee, mbee, mbeeic, "Applied Technology", "Microbee 32 IC" , 0) |