trunk/src/mame/drivers/mpu4vid.c
| r30916 | r30917 | |
| 195 | 195 | #include "crmaze2p.lh" |
| 196 | 196 | #include "crmaze4p.lh" |
| 197 | 197 | #include "includes/mpu4.h" |
| 198 | | #include "cpu/m68000/m68000.h" |
| 198 | #include "cpu/m68000/m68000.h" |
| 199 | 199 | |
| 200 | 200 | |
| 201 | 201 | struct ef9369_t |
| r30916 | r30917 | |
| 289 | 289 | DECLARE_WRITE_LINE_MEMBER(update_mpu68_interrupts); |
| 290 | 290 | DECLARE_READ16_MEMBER( mpu4_vid_vidram_r ); |
| 291 | 291 | DECLARE_WRITE16_MEMBER( mpu4_vid_vidram_w ); |
| 292 | | DECLARE_WRITE16_MEMBER( ef9369_w ); |
| 293 | | DECLARE_READ16_MEMBER( ef9369_r ); |
| 294 | | DECLARE_WRITE16_MEMBER( bt471_w ); |
| 295 | | DECLARE_READ16_MEMBER( bt471_r ); |
| 296 | | DECLARE_WRITE16_MEMBER( characteriser16_w ); |
| 297 | | DECLARE_READ16_MEMBER( characteriser16_r ); |
| 298 | | DECLARE_WRITE16_MEMBER( bwb_characteriser16_w ); |
| 299 | | DECLARE_READ16_MEMBER( bwb_characteriser16_r ); |
| 292 | DECLARE_WRITE8_MEMBER( ef9369_w ); |
| 293 | DECLARE_READ8_MEMBER( ef9369_r ); |
| 294 | DECLARE_WRITE8_MEMBER( bt471_w ); |
| 295 | DECLARE_READ8_MEMBER( bt471_r ); |
| 296 | DECLARE_WRITE8_MEMBER( vidcharacteriser_w ); |
| 297 | DECLARE_READ8_MEMBER( vidcharacteriser_r ); |
| 300 | 298 | DECLARE_WRITE_LINE_MEMBER(mpu_video_reset); |
| 301 | 299 | }; |
| 302 | 300 | |
| r30916 | r30917 | |
| 491 | 489 | |
| 492 | 490 | /* Non-multiplexed mode */ |
| 493 | 491 | |
| 494 | | WRITE16_MEMBER(mpu4vid_state::ef9369_w ) |
| 492 | WRITE8_MEMBER(mpu4vid_state::ef9369_w ) |
| 495 | 493 | { |
| 496 | 494 | struct ef9369_t &pal = m_pal; |
| 497 | | data &= 0x00ff; |
| 498 | 495 | |
| 499 | 496 | /* Address register */ |
| 500 | 497 | if (offset & 1) |
| r30916 | r30917 | |
| 532 | 529 | } |
| 533 | 530 | |
| 534 | 531 | |
| 535 | | READ16_MEMBER(mpu4vid_state::ef9369_r ) |
| 532 | READ8_MEMBER(mpu4vid_state::ef9369_r ) |
| 536 | 533 | { |
| 537 | 534 | struct ef9369_t &pal = m_pal; |
| 538 | 535 | if ((offset & 1) == 0) |
| 539 | 536 | { |
| 540 | 537 | UINT16 col = pal.clut[pal.addr >> 1]; |
| 541 | 538 | |
| 542 | | if ((pal.addr & 1) == 0) |
| 539 | /* if ((pal.addr & 1) == 0) |
| 543 | 540 | return col & 0xff; |
| 544 | 541 | else |
| 545 | 542 | return col >> 8; |
| 543 | */ |
| 544 | |
| 545 | return col; |
| 546 | 546 | } |
| 547 | 547 | else |
| 548 | 548 | { |
| 549 | 549 | /* Address register is write only */ |
| 550 | | return 0xffff; |
| 550 | return 0xff; |
| 551 | 551 | } |
| 552 | 552 | } |
| 553 | 553 | |
| r30916 | r30917 | |
| 568 | 568 | * 1 0 1 Overlay register |
| 569 | 569 | */ |
| 570 | 570 | |
| 571 | | WRITE16_MEMBER(mpu4vid_state::bt471_w ) |
| 571 | WRITE8_MEMBER(mpu4vid_state::bt471_w ) |
| 572 | 572 | { |
| 573 | 573 | struct bt471_t &bt471 = m_bt471; |
| 574 | | UINT8 val = data & 0xff; |
| 575 | | { |
| 576 | | popmessage("Bt471: Unhandled write access (offset:%x, data:%x)", offset, val); |
| 577 | | } |
| 578 | 574 | |
| 579 | 575 | switch (offset) |
| 580 | 576 | { |
| 581 | 577 | case 0x0: |
| 582 | 578 | { |
| 583 | | bt471.address = val; |
| 579 | bt471.address = data; |
| 584 | 580 | bt471.addr_cnt = 0; |
| 585 | 581 | break; |
| 586 | 582 | } |
| r30916 | r30917 | |
| 589 | 585 | UINT8 *addr_cnt = &bt471.addr_cnt; |
| 590 | 586 | rgb_t *color = &bt471.color; |
| 591 | 587 | |
| 592 | | color[*addr_cnt] = val; |
| 588 | color[*addr_cnt] = data; |
| 593 | 589 | |
| 594 | 590 | if (++*addr_cnt == 3) |
| 595 | 591 | { |
| r30916 | r30917 | |
| 603 | 599 | } |
| 604 | 600 | case 0x2: |
| 605 | 601 | { |
| 606 | | bt471.pixmask = val; |
| 602 | bt471.pixmask = data; |
| 607 | 603 | break; |
| 608 | 604 | } |
| 609 | 605 | |
| 610 | | // default: |
| 606 | default: |
| 611 | 607 | { |
| 612 | | popmessage("Bt471: Unhandled write access (offset:%x, data:%x)", offset, val); |
| 608 | popmessage("Bt471: Unhandled write access (offset:%x, data:%x)", offset, data); |
| 613 | 609 | } |
| 614 | 610 | } |
| 615 | 611 | } |
| 616 | 612 | |
| 617 | | READ16_MEMBER(mpu4vid_state::bt471_r ) |
| 613 | READ8_MEMBER(mpu4vid_state::bt471_r ) |
| 618 | 614 | { |
| 619 | 615 | popmessage("Bt471: Unhandled read access (offset:%x)", offset); |
| 620 | 616 | return 0; |
| r30916 | r30917 | |
| 1290 | 1286 | // AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */ |
| 1291 | 1287 | AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff) |
| 1292 | 1288 | AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff) |
| 1293 | | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE(ef9369_r, ef9369_w) |
| 1289 | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff) |
| 1294 | 1290 | /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ |
| 1295 | 1291 | |
| 1296 | 1292 | |
| 1297 | | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) |
| 1293 | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE8("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w,0x00ff) |
| 1298 | 1294 | |
| 1299 | 1295 | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") |
| 1300 | | AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0xff) |
| 1301 | | AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0xff) |
| 1302 | | AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) |
| 1303 | | AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE(characteriser16_r, characteriser16_w) |
| 1296 | AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0x00ff) |
| 1297 | AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0x00ff) |
| 1298 | AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff) |
| 1299 | AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE8(vidcharacteriser_r, vidcharacteriser_w,0x00ff) |
| 1304 | 1300 | ADDRESS_MAP_END |
| 1305 | 1301 | |
| 1306 | 1302 | static ADDRESS_MAP_START( mpu4oki_68k_map, AS_PROGRAM, 16, mpu4vid_state ) |
| r30916 | r30917 | |
| 1310 | 1306 | AM_RANGE(0x800000, 0x80ffff) AM_RAM AM_SHARE("vid_mainram") |
| 1311 | 1307 | AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff) |
| 1312 | 1308 | AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff) |
| 1313 | | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE(ef9369_r, ef9369_w) |
| 1309 | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff) |
| 1314 | 1310 | |
| 1315 | | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) |
| 1311 | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE8("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w,0x00ff) |
| 1316 | 1312 | |
| 1317 | 1313 | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") |
| 1318 | | AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0xff) |
| 1319 | | AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0xff) |
| 1320 | | AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) |
| 1321 | | AM_RANGE(0xffa040, 0xffa04f) AM_DEVREAD8("ptm_ic3ss", ptm6840_device, read,0xff) // 6840PTM on sampled sound board |
| 1314 | AM_RANGE(0xff8000, 0xff8001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0x00ff) |
| 1315 | AM_RANGE(0xff8002, 0xff8003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0x00ff) |
| 1316 | AM_RANGE(0xff9000, 0xff900f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff) |
| 1317 | AM_RANGE(0xffa040, 0xffa04f) AM_DEVREAD8("ptm_ic3ss", ptm6840_device, read,0x00ff) // 6840PTM on sampled sound board |
| 1322 | 1318 | AM_RANGE(0xffa040, 0xffa04f) AM_WRITE8(ic3ss_w,0x00ff) // 6840PTM on sampled sound board |
| 1323 | 1319 | AM_RANGE(0xffa060, 0xffa067) AM_DEVREADWRITE8("pia_ic4ss", pia6821_device, read, write,0x00ff) // PIA6821 on sampled sound board |
| 1324 | | AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE(characteriser16_r, characteriser16_w) |
| 1320 | AM_RANGE(0xffd000, 0xffd00f) AM_READWRITE8(vidcharacteriser_r, vidcharacteriser_w, 0x00ff) |
| 1325 | 1321 | // AM_RANGE(0xfff000, 0xffffff) AM_NOP /* Possible bug, reads and writes here */ |
| 1326 | 1322 | ADDRESS_MAP_END |
| 1327 | 1323 | |
| r30916 | r30917 | |
| 1332 | 1328 | AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */ |
| 1333 | 1329 | AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff) |
| 1334 | 1330 | AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff) |
| 1335 | | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE(ef9369_r, ef9369_w) |
| 1331 | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff) |
| 1336 | 1332 | // AM_RANGE(0xa00000, 0xa0000f) AM_READWRITE(bt471_r,bt471_w) //Some games use this |
| 1337 | 1333 | /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ |
| 1338 | 1334 | |
| 1339 | | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) |
| 1335 | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE8("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w,0x00ff) |
| 1340 | 1336 | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") |
| 1341 | | AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0xff) |
| 1342 | | AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0xff) |
| 1343 | | AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0xff) |
| 1337 | AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0x00ff) |
| 1338 | AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0x00ff) |
| 1339 | AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff) |
| 1344 | 1340 | //AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(bwb_characteriser16_r, bwb_characteriser16_w)//AM_READWRITE(adpcm_r, adpcm_w) CHR ? |
| 1345 | 1341 | ADDRESS_MAP_END |
| 1346 | 1342 | |
| r30916 | r30917 | |
| 1350 | 1346 | AM_RANGE(0x810000, 0x81ffff) AM_RAM /* ? */ |
| 1351 | 1347 | AM_RANGE(0x900000, 0x900001) AM_DEVWRITE8("saa", saa1099_device, saa1099_data_w, 0x00ff) |
| 1352 | 1348 | AM_RANGE(0x900002, 0x900003) AM_DEVWRITE8("saa", saa1099_device, saa1099_control_w, 0x00ff) |
| 1353 | | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE(ef9369_r, ef9369_w) |
| 1354 | | //AM_RANGE(0xa00000, 0xa00003) AM_READWRITE(bt471_r,bt471_w) Some games use this |
| 1349 | AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(ef9369_r, ef9369_w,0x00ff) |
| 1350 | //AM_RANGE(0xa00000, 0xa00003) AM_READWRITE8(bt471_r,bt471_w,0x00ff) Some games use this |
| 1355 | 1351 | /* AM_RANGE(0xa00004, 0xa0000f) AM_READWRITE(mpu4_vid_unmap_r, mpu4_vid_unmap_w) */ |
| 1356 | 1352 | |
| 1357 | | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w) |
| 1353 | AM_RANGE(0xb00000, 0xb0000f) AM_DEVREADWRITE8("scn2674_vid", scn2674_device, mpu4_vid_scn2674_r, mpu4_vid_scn2674_w,0x00ff) |
| 1358 | 1354 | AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(mpu4_vid_vidram_r, mpu4_vid_vidram_w) AM_SHARE("vid_vidram") |
| 1359 | | AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0xff) |
| 1360 | | AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0xff) |
| 1355 | AM_RANGE(0xe00000, 0xe00001) AM_DEVREADWRITE8("acia6850_1", acia6850_device, status_r, control_w, 0x00ff) |
| 1356 | AM_RANGE(0xe00002, 0xe00003) AM_DEVREADWRITE8("acia6850_1", acia6850_device, data_r, data_w, 0x00ff) |
| 1361 | 1357 | AM_RANGE(0xe01000, 0xe0100f) AM_DEVREADWRITE8("6840ptm_68k", ptm6840_device, read, write, 0x00ff) |
| 1362 | | AM_RANGE(0xe02000, 0xe02007) AM_DEVREADWRITE8("pia_ic4ss", pia6821_device, read, write, 0xff00) |
| 1358 | AM_RANGE(0xe02000, 0xe02007) AM_DEVREADWRITE8("pia_ic4ss", pia6821_device, read, write, 0xff00) //Seems odd... |
| 1363 | 1359 | AM_RANGE(0xe03000, 0xe0300f) AM_DEVREAD8("ptm_ic3ss", ptm6840_device, read,0xff00) // 6840PTM on sampled sound board |
| 1364 | 1360 | AM_RANGE(0xe03000, 0xe0300f) AM_WRITE8(ic3ss_w,0xff00) // 6840PTM on sampled sound board |
| 1365 | | AM_RANGE(0xe04000, 0xe0400f) AM_READWRITE(bwb_characteriser16_r, bwb_characteriser16_w)//AM_READWRITE(adpcm_r, adpcm_w) CHR ? |
| 1361 | AM_RANGE(0xe04000, 0xe0400f) AM_READWRITE8(bwb_characteriser_r, bwb_characteriser_w, 0x00ff)//AM_READWRITE(adpcm_r, adpcm_w) CHR ? |
| 1366 | 1362 | ADDRESS_MAP_END |
| 1367 | 1363 | |
| 1368 | 1364 | |
| r30916 | r30917 | |
| 1504 | 1500 | the 'challenge' part of the startup check is always the same |
| 1505 | 1501 | */ |
| 1506 | 1502 | |
| 1507 | | WRITE16_MEMBER(mpu4vid_state::characteriser16_w ) |
| 1503 | WRITE8_MEMBER(mpu4vid_state::vidcharacteriser_w ) |
| 1508 | 1504 | { |
| 1509 | 1505 | int x; |
| 1510 | 1506 | int call=(data&0xff); |
| r30916 | r30917 | |
| 1535 | 1531 | } |
| 1536 | 1532 | |
| 1537 | 1533 | |
| 1538 | | READ16_MEMBER(mpu4vid_state::characteriser16_r ) |
| 1534 | READ8_MEMBER(mpu4vid_state::vidcharacteriser_r ) |
| 1539 | 1535 | { |
| 1540 | 1536 | LOG_CHR_FULL(("%04x Characteriser read offset %02X,data %02X", space.device().safe_pcbase(),offset,m_current_chr_table[m_prot_col].response)); |
| 1541 | 1537 | LOG_CHR(("Characteriser read offset %02X \n",offset)); |
| r30916 | r30917 | |
| 1558 | 1554 | } |
| 1559 | 1555 | |
| 1560 | 1556 | |
| 1561 | | /* |
| 1562 | | BwB Characteriser (CHR) |
| 1563 | 1557 | |
| 1564 | | The BwB method of protection is considerably different to the Barcrest one, with any |
| 1565 | | incorrect behaviour manifesting in ridiculously large payouts. |
| 1566 | | |
| 1567 | | In fact, the software seems deliberately designed to mislead, but is (fortunately for |
| 1568 | | us) prone to similar weaknesses that allow a per game solution. |
| 1569 | | |
| 1570 | | See mpu4hw.c for more info |
| 1571 | | |
| 1572 | | As BwB games aren't yet booting on the 16-bit board, we're duplicating the 8-bit program |
| 1573 | | Precedent suggests this is not that dangerous an assumption to make. |
| 1574 | | */ |
| 1575 | | |
| 1576 | | |
| 1577 | | WRITE16_MEMBER(mpu4vid_state::bwb_characteriser16_w ) |
| 1578 | | { |
| 1579 | | int x; |
| 1580 | | int call=(data &0xff); |
| 1581 | | LOG_CHR_FULL(("%04x Characteriser write offset %02X data %02X \n", space.device().safe_pcbase(),offset,data)); |
| 1582 | | if (!m_current_chr_table) |
| 1583 | | { |
| 1584 | | logerror("No Characteriser Table @ %04x\n", space.device().safe_pcbase()); |
| 1585 | | return; |
| 1586 | | } |
| 1587 | | |
| 1588 | | if (offset == 0) |
| 1589 | | { |
| 1590 | | if (!m_chr_state) |
| 1591 | | { |
| 1592 | | m_chr_state=1; |
| 1593 | | m_chr_counter=0; |
| 1594 | | } |
| 1595 | | if (call == 0) |
| 1596 | | { |
| 1597 | | m_init_col ++; |
| 1598 | | } |
| 1599 | | else |
| 1600 | | { |
| 1601 | | m_init_col =0; |
| 1602 | | } |
| 1603 | | } |
| 1604 | | m_chr_value = space.machine().rand(); |
| 1605 | | for (x = 0; x < 4; x++) |
| 1606 | | { |
| 1607 | | if (m_current_chr_table[(x)].call == call) |
| 1608 | | { |
| 1609 | | if (x == 0) // reinit |
| 1610 | | { |
| 1611 | | m_bwb_return = 0; |
| 1612 | | } |
| 1613 | | m_chr_value = bwb_chr_table_common[(m_bwb_return)]; |
| 1614 | | m_bwb_return++; |
| 1615 | | break; |
| 1616 | | } |
| 1617 | | } |
| 1618 | | } |
| 1619 | | |
| 1620 | | READ16_MEMBER(mpu4vid_state::bwb_characteriser16_r ) |
| 1621 | | { |
| 1622 | | LOG_CHR(("Characteriser read offset %02X \n",offset)); |
| 1623 | | |
| 1624 | | |
| 1625 | | if (offset ==0) |
| 1626 | | { |
| 1627 | | switch (m_chr_counter) |
| 1628 | | { |
| 1629 | | case 6: |
| 1630 | | case 13: |
| 1631 | | case 20: |
| 1632 | | case 27: |
| 1633 | | case 34: |
| 1634 | | { |
| 1635 | | return m_bwb_chr_table1[(((m_chr_counter + 1) / 7) - 1)].response; |
| 1636 | | } |
| 1637 | | default: |
| 1638 | | { |
| 1639 | | if (m_chr_counter > 34) |
| 1640 | | { |
| 1641 | | m_chr_counter = 35; |
| 1642 | | m_chr_state = 2; |
| 1643 | | } |
| 1644 | | m_chr_counter ++; |
| 1645 | | return m_chr_value; |
| 1646 | | } |
| 1647 | | } |
| 1648 | | } |
| 1649 | | else |
| 1650 | | { |
| 1651 | | return m_chr_value; |
| 1652 | | } |
| 1653 | | } |
| 1654 | | |
| 1655 | 1558 | static mpu4_chr_table adders_data[64] = { |
| 1656 | 1559 | {0x00, 0x00}, {0x1A, 0x8C}, {0x04, 0x64}, {0x10, 0x84}, {0x18, 0x84}, {0x0F, 0xC4}, {0x13, 0x84}, {0x1B, 0x84}, |
| 1657 | 1560 | {0x03, 0x9C}, {0x07, 0xF4}, {0x17, 0x04}, {0x1D, 0xCC}, {0x36, 0x24}, {0x35, 0x84}, {0x2B, 0xC4}, {0x28, 0x94}, |