src/mess/drivers/mz2500.c
| r8921 | r8922 | |
| 37 | 37 | static UINT8 bank_val[8],bank_addr; |
| 38 | 38 | static UINT8 irq_sel,irq_vector[4]; |
| 39 | 39 | static UINT8 kanji_bank; |
| 40 | static UINT8 fdc_reverse; |
| 40 | 41 | |
| 41 | 42 | #define WRAM_RESET 0 |
| 42 | 43 | #define IPL_RESET 1 |
| r8921 | r8922 | |
| 424 | 425 | palette_set_color_rgb(space->machine, pal_entry+0x200,pal4bit(r[pal_entry]),pal4bit(g[pal_entry]),pal4bit(b[pal_entry])); |
| 425 | 426 | } |
| 426 | 427 | |
| 427 | | static READ8_DEVICE_HANDLER( mz2500_wd17xx_r ) |
| 428 | static READ8_DEVICE_HANDLER( mz2500_wd17xx_r ) |
| 428 | 429 | { |
| 429 | | return wd17xx_r(device, offset) ^ 0xff; |
| 430 | return wd17xx_r(device, offset) ^ fdc_reverse; |
| 430 | 431 | } |
| 431 | 432 | |
| 432 | 433 | static WRITE8_DEVICE_HANDLER( mz2500_wd17xx_w ) |
| 433 | 434 | { |
| 434 | | wd17xx_w(device, offset, data ^ 0xff); |
| 435 | wd17xx_w(device, offset, data ^ fdc_reverse); |
| 435 | 436 | } |
| 436 | 437 | |
| 437 | 438 | static ADDRESS_MAP_START(mz2500_io, ADDRESS_SPACE_IO, 8) |
| r8921 | r8922 | |
| 700 | 701 | DEVCB_NULL |
| 701 | 702 | }; |
| 702 | 703 | |
| 704 | static WRITE8_DEVICE_HANDLER( opn_porta_w ) |
| 705 | { |
| 706 | /* |
| 707 | ---- x--- mouse select |
| 708 | ---- -x-- palette bit (16/4096 colors) |
| 709 | ---- --x- floppy reverse bit (controls wd17xx bits in command registers) |
| 710 | */ |
| 711 | |
| 712 | //printf("%02x\n",data); |
| 713 | fdc_reverse = data & 2 ? 0x00 : 0xff; |
| 714 | } |
| 715 | |
| 703 | 716 | static const ym2203_interface ym2203_interface_1 = |
| 704 | 717 | { |
| 705 | 718 | { |
| r8921 | r8922 | |
| 707 | 720 | AY8910_DEFAULT_LOADS, |
| 708 | 721 | DEVCB_INPUT_PORT("DSW0"), // read A |
| 709 | 722 | DEVCB_INPUT_PORT("DSW1"), // read B |
| 710 | | DEVCB_NULL, // write A |
| 723 | DEVCB_HANDLER(opn_porta_w), // write A |
| 711 | 724 | DEVCB_NULL // write B |
| 712 | 725 | }, |
| 713 | 726 | NULL |