src/mess/video/trs80.c
| r4458 | r4459 | |
| 20 | 20 | |
| 21 | 21 | static UINT16 start_address=0; |
| 22 | 22 | static UINT8 crtc_reg; |
| 23 | static UINT8 trs80_size_store; |
| 23 | 24 | |
| 24 | 25 | WRITE8_HANDLER( trs80m4_88_w ) |
| 25 | 26 | { |
| r4458 | r4459 | |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | |
| 48 | VIDEO_START( trs80 ) |
| 49 | { |
| 50 | trs80_size_store = 0xff; |
| 51 | trs80_mode &= 2; |
| 52 | } |
| 53 | |
| 54 | |
| 47 | 55 | /* 7 or 8-bit video, 32/64 characters per line = trs80, trs80l2, sys80 */ |
| 48 | 56 | VIDEO_UPDATE( trs80 ) |
| 49 | 57 | { |
| 50 | 58 | UINT8 y,ra,chr,gfx,gfxbit; |
| 51 | 59 | UINT16 sy=0,ma=0,x; |
| 52 | 60 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 53 | | static UINT8 size_store=0xff; |
| 54 | | static UINT8 cols=64,skip=1; |
| 61 | UINT8 cols = (trs80_mode & 1) ? 32 : 64; |
| 62 | UINT8 skip = (trs80_mode & 1) ? 2 : 1; |
| 55 | 63 | |
| 56 | | if ((trs80_mode & 0x7f) != size_store) |
| 64 | if (trs80_mode != trs80_size_store) |
| 57 | 65 | { |
| 58 | | size_store = trs80_mode & 0x7f; |
| 59 | | cols = (trs80_mode & 1) ? 32 : 64; |
| 60 | | skip = (trs80_mode & 1) ? 2 : 1; |
| 66 | trs80_size_store = trs80_mode & 1; |
| 61 | 67 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 62 | 68 | } |
| 63 | 69 | |
| r4458 | r4459 | |
| 115 | 121 | UINT8 y,ra,chr,gfx,gfxbit; |
| 116 | 122 | UINT16 sy=0,ma=0,x; |
| 117 | 123 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 118 | | static UINT8 size_store=0xff; |
| 119 | | static UINT8 cols=64,rows=16,skip=1,s_cols,lines=12; |
| 124 | UINT8 skip=1; |
| 125 | UINT8 cols = (trs80_mode & 4) ? 80 : 64; |
| 126 | UINT8 rows = (trs80_mode & 4) ? 24 : 16; |
| 127 | UINT8 lines = (trs80_mode & 4) ? 10 : 12; |
| 128 | UINT8 s_cols = cols; |
| 120 | 129 | |
| 121 | | if ((trs80_mode & 0x7f) != size_store) |
| 130 | if (trs80_mode & 1) |
| 122 | 131 | { |
| 123 | | size_store = trs80_mode & 0x7f; |
| 124 | | s_cols = cols = (trs80_mode & 4) ? 80 : 64; |
| 125 | | rows = (trs80_mode & 4) ? 24 : 16; |
| 126 | | lines = (trs80_mode & 4) ? 10 : 12; |
| 132 | s_cols >>= 1; |
| 133 | skip = 2; |
| 134 | } |
| 127 | 135 | |
| 128 | | if (trs80_mode & 1) |
| 129 | | { |
| 130 | | s_cols >>= 1; |
| 131 | | skip = 2; |
| 132 | | } |
| 136 | if ((trs80_mode & 0x7f) != trs80_size_store) |
| 137 | { |
| 138 | trs80_size_store = trs80_mode & 5; |
| 133 | 139 | video_screen_set_visarea(screen, 0, s_cols*FW-1, 0, rows*lines-1); |
| 134 | 140 | } |
| 135 | 141 | |
| r4458 | r4459 | |
| 188 | 194 | UINT8 y,ra,chr,gfx,gfxbit; |
| 189 | 195 | UINT16 sy=0,ma=0,x; |
| 190 | 196 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 191 | | static UINT8 size_store=0xff; |
| 192 | | static UINT8 cols=64,skip=1; |
| 197 | UINT8 cols = (trs80_mode & 1) ? 32 : 64; |
| 198 | UINT8 skip = (trs80_mode & 1) ? 2 : 1; |
| 193 | 199 | |
| 194 | | if ((trs80_mode & 0x7f) != size_store) |
| 200 | if (trs80_mode != trs80_size_store) |
| 195 | 201 | { |
| 196 | | size_store = trs80_mode & 0x7f; |
| 197 | | cols = (trs80_mode & 1) ? 32 : 64; |
| 198 | | skip = (trs80_mode & 1) ? 2 : 1; |
| 202 | trs80_size_store = trs80_mode & 1; |
| 199 | 203 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 200 | 204 | } |
| 201 | 205 | |
| r4458 | r4459 | |
| 247 | 251 | VIDEO_UPDATE( lnw80 ) |
| 248 | 252 | { |
| 249 | 253 | const UINT16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; |
| 250 | | UINT8 y,ra,chr,gfx,gfxbit,bg=7,fg=0; |
| 251 | | UINT16 sy=0,ma=0,x; |
| 254 | UINT8 chr,gfx,gfxbit,bg=7,fg=0; |
| 255 | UINT16 sy=0,ma=0,x,y,ra; |
| 252 | 256 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 253 | | static UINT8 size_store=0xff; |
| 254 | | static UINT8 cols=64; |
| 255 | | |
| 257 | UINT8 cols = (trs80_mode & 0x10) ? 80 : 64; |
| 258 | |
| 256 | 259 | /* Although the OS can select 32-character mode, it is not supported by hardware */ |
| 257 | | if ((trs80_mode & 0x7f) != size_store) |
| 260 | if (trs80_mode != trs80_size_store) |
| 258 | 261 | { |
| 259 | | size_store = trs80_mode & 0x7f; |
| 260 | | cols = (trs80_mode & 16) ? 80 : 64; |
| 262 | trs80_size_store = trs80_mode & 0x10; |
| 261 | 263 | video_screen_set_visarea(screen, 0, cols*FW-1, 0, 16*FH-1); |
| 262 | 264 | } |
| 263 | 265 | |
| r4458 | r4459 | |
| 315 | 317 | break; |
| 316 | 318 | |
| 317 | 319 | case 0x10: // MODE 1 |
| 318 | | #if 0 // not ready yet |
| 319 | 320 | for (y = 0x40; y < 0x400; y+=0x40) |
| 320 | 321 | { |
| 321 | 322 | for (ra = 0x400; ra < 0x3000; ra+=0x400) |
| r4458 | r4459 | |
| 326 | 327 | { |
| 327 | 328 | gfx = gfxram[ y | x | ra]; |
| 328 | 329 | /* Display 6 pixels in normal region */ |
| 330 | *p = ( gfx & 0x01 ) ? fg : bg; p++; |
| 331 | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 329 | 332 | *p = ( gfx & 0x04 ) ? fg : bg; p++; |
| 330 | | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 331 | | *p = ( gfx & 0x40 ) ? fg : bg; p++; |
| 332 | | *p = ( gfx & 0x80 ) ? fg : bg; p++; |
| 333 | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 334 | *p = ( gfx & 0x10 ) ? fg : bg; p++; |
| 333 | 335 | *p = ( gfx & 0x20 ) ? fg : bg; p++; |
| 334 | | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 335 | 336 | } |
| 336 | 337 | |
| 337 | 338 | for (x = 0; x < 0x10; x++) |
| 338 | 339 | { |
| 339 | | gfx = gfxram[ 0x3000 | x | ra & 0xc00 | (ra & 0x3000) >> 8]; |
| 340 | gfx = gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; |
| 340 | 341 | /* Display 6 pixels in extended region */ |
| 342 | *p = ( gfx & 0x01 ) ? fg : bg; p++; |
| 343 | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 341 | 344 | *p = ( gfx & 0x04 ) ? fg : bg; p++; |
| 342 | | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 343 | | *p = ( gfx & 0x40 ) ? fg : bg; p++; |
| 344 | | *p = ( gfx & 0x80 ) ? fg : bg; p++; |
| 345 | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 346 | *p = ( gfx & 0x10 ) ? fg : bg; p++; |
| 345 | 347 | *p = ( gfx & 0x20 ) ? fg : bg; p++; |
| 346 | | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 347 | 348 | } |
| 348 | 349 | } |
| 349 | 350 | } |
| 350 | | #endif |
| 351 | 351 | break; |
| 352 | |
| 352 | 353 | case 0x20: // MODE 2 |
| 354 | /* it seems the text video ram can have an effect in this mode, |
| 355 | not explained clearly, so not emulated */ |
| 356 | for (y = 0x40; y < 0x400; y+=0x40) |
| 357 | { |
| 358 | for (ra = 0x400; ra < 0x3000; ra+=0x400) |
| 359 | { |
| 360 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 361 | |
| 362 | for (x = 0; x < 0x40; x++) |
| 363 | { |
| 364 | gfx = gfxram[ y | x | ra]; |
| 365 | /* Display 6 pixels in normal region */ |
| 366 | fg = (gfx & 0x38) >> 3; |
| 367 | *p = fg; p++; |
| 368 | *p = fg; p++; |
| 369 | *p = fg; p++; |
| 370 | fg = gfx & 0x07; |
| 371 | *p = fg; p++; |
| 372 | *p = fg; p++; |
| 373 | *p = fg; p++; |
| 374 | } |
| 375 | } |
| 376 | } |
| 353 | 377 | break; |
| 378 | |
| 354 | 379 | case 0x30: // MODE 3 |
| 380 | /* the manual does not explain at all how colour is determined |
| 381 | for the extended area. Further, the background colour |
| 382 | is not mentioned anywhere. Black is assumed. */ |
| 383 | for (y = 0x40; y < 0x400; y+=0x40) |
| 384 | { |
| 385 | for (ra = 0x400; ra < 0x3000; ra+=0x400) |
| 386 | { |
| 387 | UINT16 *p = BITMAP_ADDR16(bitmap, sy++, 0); |
| 388 | |
| 389 | for (x = 0; x < 0x40; x++) |
| 390 | { |
| 391 | gfx = gfxram[ y | x | ra]; |
| 392 | fg = (videoram[ 0x3c00 | x | y ] & 0x38) >> 3; |
| 393 | /* Display 6 pixels in normal region */ |
| 394 | *p = ( gfx & 0x01 ) ? fg : bg; p++; |
| 395 | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 396 | *p = ( gfx & 0x04 ) ? fg : bg; p++; |
| 397 | fg = videoram[ 0x3c00 | x | y ] & 0x07; |
| 398 | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 399 | *p = ( gfx & 0x10 ) ? fg : bg; p++; |
| 400 | *p = ( gfx & 0x20 ) ? fg : bg; p++; |
| 401 | } |
| 402 | |
| 403 | for (x = 0; x < 0x10; x++) |
| 404 | { |
| 405 | gfx = gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; |
| 406 | fg = (gfxram[ 0x3c00 | x | y ] & 0x38) >> 3; |
| 407 | /* Display 6 pixels in extended region */ |
| 408 | *p = ( gfx & 0x01 ) ? fg : bg; p++; |
| 409 | *p = ( gfx & 0x02 ) ? fg : bg; p++; |
| 410 | *p = ( gfx & 0x04 ) ? fg : bg; p++; |
| 411 | fg = gfxram[ 0x3c00 | x | y ] & 0x07; |
| 412 | *p = ( gfx & 0x08 ) ? fg : bg; p++; |
| 413 | *p = ( gfx & 0x10 ) ? fg : bg; p++; |
| 414 | *p = ( gfx & 0x20 ) ? fg : bg; p++; |
| 415 | } |
| 416 | } |
| 417 | } |
| 355 | 418 | break; |
| 356 | 419 | } |
| 357 | 420 | return 0; |
| r4458 | r4459 | |
| 363 | 426 | UINT8 y,ra,chr,gfx; |
| 364 | 427 | UINT16 sy=0,ma=0,x; |
| 365 | 428 | UINT8 *FNT = memory_region(screen->machine, "gfx1"); |
| 366 | | static UINT8 size_store=0xff; |
| 367 | | static UINT8 cols=64,skip=1; |
| 429 | UINT8 cols = (trs80_mode & 1) ? 32 : 64; |
| 430 | UINT8 skip = (trs80_mode & 1) ? 2 : 1; |
| 368 | 431 | |
| 369 | | if ((trs80_mode & 0x7f) != size_store) |
| 432 | if (trs80_mode != trs80_size_store) |
| 370 | 433 | { |
| 371 | | size_store = trs80_mode & 0x7f; |
| 372 | | cols = (trs80_mode & 1) ? 32 : 64; |
| 373 | | skip = (trs80_mode & 1) ? 2 : 1; |
| 434 | trs80_size_store = trs80_mode & 1; |
| 374 | 435 | video_screen_set_visarea(screen, 0, cols*8-1, 0, 16*16-1); |
| 375 | 436 | } |
| 376 | 437 | |
| r4458 | r4459 | |
| 420 | 481 | videoram[offset] = data; |
| 421 | 482 | } |
| 422 | 483 | |
| 423 | | /*************************************************************************** |
| 424 | | Write to graphics ram |
| 425 | | ***************************************************************************/ |
| 426 | | #if 0 // not ready yet |
| 427 | | READ8_HANDLER( trs80_gfxram_r ) |
| 428 | | { |
| 429 | | return gfxram[offset]; |
| 430 | | } |
| 431 | 484 | |
| 432 | | WRITE8_HANDLER( trs80_gfxram_w ) |
| 433 | | { |
| 434 | | gfxram[offset] = data; |
| 435 | | } |
| 436 | | #endif |
| 437 | | |
| 438 | 485 | /*************************************************************************** |
| 439 | 486 | Palettes |
| 440 | 487 | ***************************************************************************/ |
src/mess/machine/trs80.c
| r4458 | r4459 | |
| 40 | 40 | static UINT8 trs80_tape_unit=1; /* selected cassette unit (trs80l2 and sys80 only) (not implemented yet) */ |
| 41 | 41 | static UINT8 trs80_reg_load=1; /* Controls what port EA will do */ |
| 42 | 42 | static UINT8 trs80_nmi_data=0xff; /* Passes FDC int to NMI handler */ |
| 43 | | static UINT8 lnw80_port_fe=0xf0; /* LNW80 video control bits */ |
| 44 | 43 | UINT8 trs80_mode = 0; /* Control bits passed to video output routine */ |
| 45 | 44 | |
| 46 | 45 | #define IRQ_M1_RTC 0x80 /* RTC on Model I */ |
| r4458 | r4459 | |
| 253 | 252 | } |
| 254 | 253 | |
| 255 | 254 | |
| 255 | |
| 256 | 256 | /************************************* |
| 257 | 257 | * |
| 258 | 258 | * Port handlers. |
| 259 | 259 | * |
| 260 | 260 | *************************************/ |
| 261 | 261 | |
| 262 | /* lnw80 can switch out all the devices, roms and video ram to be replaced by graphics ram. */ |
| 263 | READ8_HANDLER( lnw80_r ) |
| 264 | { |
| 265 | UINT8 *ROM = memory_region(space->machine, "maincpu"); |
| 266 | if (trs80_mode & 0x40) |
| 267 | return gfxram[offset]; |
| 268 | else |
| 269 | if (offset <= 0x3000) |
| 270 | return ROM[offset]; |
| 271 | else |
| 272 | if (offset < 0x37e4) |
| 273 | return trs80_irq_status_r(space, 0); |
| 274 | else |
| 275 | if (offset < 0x37e8) |
| 276 | return 0xff; |
| 277 | else |
| 278 | if (offset < 0x37ec) |
| 279 | return trs80_printer_r(space, 0); |
| 280 | else |
| 281 | if (offset == 0x37ec) |
| 282 | return trs80_wd179x_r(trs80_fdc, 0); |
| 283 | else |
| 284 | if (offset == 0x37ed) |
| 285 | return wd17xx_track_r(trs80_fdc, 0); |
| 286 | else |
| 287 | if (offset == 0x37ee) |
| 288 | return wd17xx_sector_r(trs80_fdc, 0); |
| 289 | else |
| 290 | if (offset == 0x37ef) |
| 291 | return wd17xx_data_r(trs80_fdc, 0); |
| 292 | else |
| 293 | if (offset < 0x3800) |
| 294 | return 0xff; |
| 295 | else |
| 296 | if (offset < 0x3c00) |
| 297 | return trs80_keyboard_r(space, offset & 0xff); |
| 298 | else |
| 299 | return videoram[offset&0x3ff]; |
| 300 | } |
| 301 | |
| 302 | WRITE8_HANDLER( lnw80_w ) |
| 303 | { |
| 304 | if (trs80_mode & 0x40) |
| 305 | gfxram[offset] = data; |
| 306 | else |
| 307 | if (offset < 0x37e0) |
| 308 | return; |
| 309 | else |
| 310 | if (offset < 0x37e4) |
| 311 | trs80_motor_w(space, 0, data); |
| 312 | else |
| 313 | if (offset < 0x37e8) |
| 314 | return; |
| 315 | else |
| 316 | if (offset < 0x37ec) |
| 317 | trs80_printer_w(space, 0, data); |
| 318 | else |
| 319 | if (offset == 0x37ec) |
| 320 | wd17xx_command_w(trs80_fdc, 0, data); |
| 321 | else |
| 322 | if (offset == 0x37ed) |
| 323 | wd17xx_track_w(trs80_fdc, 0, data); |
| 324 | else |
| 325 | if (offset == 0x37ee) |
| 326 | wd17xx_sector_w(trs80_fdc, 0, data); |
| 327 | else |
| 328 | if (offset == 0x37ef) |
| 329 | wd17xx_data_w(trs80_fdc, 0, data); |
| 330 | else |
| 331 | if (offset < 0x3c00) |
| 332 | return; |
| 333 | else |
| 334 | videoram[offset&0x3ff]=data; |
| 335 | } |
| 336 | |
| 337 | |
| 262 | 338 | READ8_HANDLER( trs80m4_e0_r ) |
| 263 | 339 | { |
| 264 | 340 | /* Indicates which devices are interrupting - d6..d3 not emulated. |
| r4458 | r4459 | |
| 373 | 449 | |
| 374 | 450 | READ8_HANDLER( lnw80_fe_r ) |
| 375 | 451 | { |
| 376 | | return lnw80_port_fe | 0xf0; |
| 452 | return ((trs80_mode & 0x78) >> 3) | 0xf0; |
| 377 | 453 | } |
| 378 | 454 | |
| 379 | 455 | READ8_HANDLER( trs80_ff_r ) |
| r4458 | r4459 | |
| 529 | 605 | d2 Mode Select (0=64 chars, 1=32chars) |
| 530 | 606 | d1 Cassette Motor (1=On) */ |
| 531 | 607 | |
| 532 | | static UINT8 settings=0xff; |
| 533 | | UINT8 changed = data ^ settings; |
| 608 | cpu_set_clock(space->machine->cpu[0], data & 0x40 ? MODEL4_MASTER_CLOCK/5 : MODEL4_MASTER_CLOCK/10); |
| 534 | 609 | |
| 535 | | if (changed & 0x40) |
| 536 | | cpu_set_clock(space->machine->cpu[0], data & 0x40 ? MODEL4_MASTER_CLOCK/5 : MODEL4_MASTER_CLOCK/10); |
| 537 | | |
| 538 | 610 | trs80_mode = (trs80_mode & 0xfe) | ((data & 4) ? 1 : 0); |
| 539 | 611 | |
| 540 | | if (changed & 0x02) |
| 541 | | cassette_change_state( trs80_cass, ( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| 612 | cassette_change_state( trs80_cass, ( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); |
| 542 | 613 | |
| 543 | | settings = data; |
| 544 | 614 | trs80_port_ec = data & 0x7e; |
| 545 | 615 | } |
| 546 | 616 | |
| r4458 | r4459 | |
| 606 | 676 | d0 inverse video (entire screen) */ |
| 607 | 677 | |
| 608 | 678 | trs80_mode = (trs80_mode & 0x87) | ((data & 0x0f) << 3); |
| 609 | | lnw80_port_fe = data; |
| 610 | 679 | } |
| 611 | 680 | |
| 612 | 681 | WRITE8_HANDLER( trs80_ff_w ) |
| r4458 | r4459 | |
| 713 | 782 | * * |
| 714 | 783 | *************************************/ |
| 715 | 784 | |
| 785 | READ8_DEVICE_HANDLER (trs80_wd179x_r) |
| 786 | { |
| 787 | if (input_port_read(device->machine, "CONFIG") & 0x80) |
| 788 | return wd17xx_status_r(device, offset); |
| 789 | else |
| 790 | return 0xff; |
| 791 | } |
| 792 | |
| 716 | 793 | READ8_HANDLER ( trs80_printer_r ) |
| 717 | 794 | { |
| 718 | 795 | /* Bit 7 - 1 = Busy; 0 = Not Busy |
| r4458 | r4459 | |
| 780 | 857 | drive = 3; |
| 781 | 858 | head = 0; |
| 782 | 859 | break; |
| 783 | | /* These 3 combinations aren't documented */ |
| 860 | /* These 3 combinations aren't official. Some manufacturers of double-sided disks |
| 861 | used drive select 4 to indicate the other side. */ |
| 784 | 862 | case 9: |
| 785 | 863 | drive = 0; |
| 786 | 864 | head = 1; |
src/mess/drivers/trs80.c
| r4458 | r4459 | |
| 144 | 144 | #include "devices/cassette.h" |
| 145 | 145 | #include "formats/trs_cas.h" |
| 146 | 146 | |
| 147 | UINT8 *gfxram; |
| 147 | 148 | UINT8 trs80_model4; |
| 148 | 149 | |
| 149 | | static READ8_DEVICE_HANDLER (trs80_wd179x_r) |
| 150 | | { |
| 151 | | if (input_port_read(device->machine, "CONFIG") & 0x80) |
| 152 | | return wd17xx_status_r(device, offset); |
| 153 | | else |
| 154 | | return 0xff; |
| 155 | | } |
| 156 | | |
| 157 | 150 | static ADDRESS_MAP_START( trs80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 158 | 151 | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 159 | 152 | AM_RANGE(0x3800, 0x38ff) AM_READ(trs80_keyboard_r) |
| r4458 | r4459 | |
| 196 | 189 | AM_RANGE(0xff, 0xff) AM_READWRITE(trs80_ff_r, trs80_ff_w) |
| 197 | 190 | ADDRESS_MAP_END |
| 198 | 191 | |
| 192 | static ADDRESS_MAP_START( lnw80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 193 | AM_RANGE(0x0000, 0x3fff) AM_READWRITE(lnw80_r, lnw80_w) |
| 194 | AM_RANGE(0x4000, 0xffff) AM_RAM |
| 195 | ADDRESS_MAP_END |
| 196 | |
| 199 | 197 | static ADDRESS_MAP_START( lnw80_io, ADDRESS_SPACE_IO, 8 ) |
| 200 | 198 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 201 | 199 | AM_RANGE(0xe8, 0xe8) AM_READWRITE(trs80m4_e8_r, trs80m4_e8_w) |
| r4458 | r4459 | |
| 425 | 423 | MDRV_PALETTE_LENGTH(2) |
| 426 | 424 | MDRV_PALETTE_INIT(black_and_white) |
| 427 | 425 | |
| 426 | MDRV_VIDEO_START( trs80 ) |
| 428 | 427 | MDRV_VIDEO_UPDATE( trs80 ) |
| 429 | 428 | |
| 430 | 429 | /* sound hardware */ |
| r4458 | r4459 | |
| 481 | 480 | static MACHINE_DRIVER_START( lnw80 ) |
| 482 | 481 | MDRV_IMPORT_FROM( model1 ) |
| 483 | 482 | MDRV_CPU_MODIFY( "maincpu" ) |
| 484 | | MDRV_CPU_PROGRAM_MAP( model1_map, 0 ) |
| 483 | MDRV_CPU_PROGRAM_MAP( lnw80_map, 0 ) |
| 485 | 484 | MDRV_CPU_IO_MAP( lnw80_io, 0 ) |
| 486 | 485 | |
| 487 | 486 | MDRV_PALETTE_LENGTH(8) |
| r4458 | r4459 | |
| 567 | 566 | |
| 568 | 567 | ROM_REGION(0x00800, "gfx1",0) |
| 569 | 568 | ROM_LOAD("lnw_chr.bin", 0x0000, 0x0800, CRC(c89b27df) SHA1(be2a009a07e4378d070002a558705e9a0de59389)) |
| 569 | |
| 570 | ROM_REGION(0x04400, "gfx2",0) |
| 571 | ROM_FILL(0, 0x4400, 0xff) /* 0x4000 for gfxram + 0x400 for videoram */ |
| 570 | 572 | ROM_END |
| 571 | 573 | |
| 572 | 574 | ROM_START(trs80m3) |
| r4458 | r4459 | |
| 640 | 642 | trs80_model4 = 1; |
| 641 | 643 | } |
| 642 | 644 | |
| 645 | static DRIVER_INIT( lnw80 ) |
| 646 | { |
| 647 | trs80_mode = 0; |
| 648 | trs80_model4 = 0; |
| 649 | gfxram = memory_region(machine, "gfx2"); |
| 650 | videoram = memory_region(machine, "gfx2")+0x4000; |
| 651 | } |
| 652 | |
| 643 | 653 | static void trs8012_floppy_getinfo(const mess_device_class *devclass, UINT32 state, union devinfo *info) |
| 644 | 654 | { |
| 645 | 655 | /* floppy */ |
| r4458 | r4459 | |
| 667 | 677 | COMP( 1978, trs80l2, trs80, 0, model1, trs80, trs80l2, trs8012, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)" , 0 ) |
| 668 | 678 | COMP( 1983, radionic, trs80, 0, radionic, trs80, trs80, trs8012, "Komtek", "Radionic" , 0 ) |
| 669 | 679 | COMP( 1980, sys80, trs80, 0, sys80, trs80, trs80l2, trs8012, "EACA Computers Ltd.","System-80" , 0 ) |
| 670 | | COMP( 1981, lnw80, trs80, 0, lnw80, trs80m3, trs80, trs8012, "LNW Research","LNW-80", 0 ) |
| 680 | COMP( 1981, lnw80, trs80, 0, lnw80, trs80m3, lnw80, trs8012, "LNW Research","LNW-80", 0 ) |
| 671 | 681 | COMP( 1980, trs80m3, trs80, 0, model3, trs80m3, trs80m4, trs8012, "Tandy Radio Shack", "TRS-80 Model III", 0 ) |
| 672 | 682 | COMP( 1980, trs80m4, trs80, 0, model3, trs80m3, trs80m4, trs8012, "Tandy Radio Shack", "TRS-80 Model 4", 0 ) |
| 673 | 683 | COMP( 1980, trs80m4p, trs80, 0, model3, trs80m3, trs80m4, trs8012, "Tandy Radio Shack", "TRS-80 Model 4P", GAME_NOT_WORKING ) |