src/mess/drivers/pes.c
| r10781 | r10782 | |
| 169 | 169 | m_port3_state = data; |
| 170 | 170 | #ifdef DEBUG_PORTS |
| 171 | 171 | logerror("port3 write: control data written: %02X; ", data); |
| 172 | | logerror("RXD: %d; ", (data&1)); |
| 173 | | logerror("TXD: %d; ", ((data&2)>>1)); |
| 174 | | logerror("/INT: %d; ", ((data&4)>>2)); |
| 175 | | logerror("/RDY: %d; ", ((data&8)>>3)); |
| 176 | | logerror("RTS: %d; ", ((data&0x10)>>4)); |
| 177 | | logerror("CTS: %d; ", ((data&0x20)>>5)); |
| 178 | | logerror("WR: %d; ", ((data&0x40)>>6)); |
| 179 | | logerror("RD: %d;\n", ((data&0x80)>>7)); |
| 172 | logerror("RXD: %d; ", BIT(data,0)); |
| 173 | logerror("TXD: %d; ", BIT(data,1)); |
| 174 | logerror("/INT: %d; ", BIT(data,2)); |
| 175 | logerror("/RDY: %d; ", BIT(data,3)); |
| 176 | logerror("RTS: %d; ", BIT(data,4)); |
| 177 | logerror("CTS: %d; ", BIT(data,5)); |
| 178 | logerror("WR: %d; ", BIT(data,6)); |
| 179 | logerror("RD: %d;\n", BIT(data,7)); |
| 180 | 180 | #endif |
| 181 | 181 | // todo: poke serial handler here somehow? |
| 182 | 182 | } |
| r10781 | r10782 | |
| 194 | 194 | data |= (tms5220_readyq_r(state->m_speech)<<3); |
| 195 | 195 | #ifdef DEBUG_PORTS |
| 196 | 196 | logerror("port3 read: returning 0x%02X: ", data); |
| 197 | | logerror("RXD: %d; ", (data&1)); |
| 198 | | logerror("TXD: %d; ", ((data&2)>>1)); |
| 199 | | logerror("/INT: %d; ", ((data&4)>>2)); |
| 200 | | logerror("/RDY: %d; ", ((data&8)>>3)); |
| 201 | | logerror("RTS: %d; ", ((data&0x10)>>4)); |
| 202 | | logerror("CTS: %d; ", ((data&0x20)>>5)); |
| 203 | | logerror("WR: %d; ", ((data&0x40)>>6)); |
| 204 | | logerror("RD: %d;\n", ((data&0x80)>>7)); |
| 197 | logerror("RXD: %d; ", BIT(data,0)); |
| 198 | logerror("TXD: %d; ", BIT(data,1)); |
| 199 | logerror("/INT: %d; ", BIT(data,2)); |
| 200 | logerror("/RDY: %d; ", BIT(data,3)); |
| 201 | logerror("RTS: %d; ", BIT(data,4)); |
| 202 | logerror("CTS: %d; ", BIT(data,5)); |
| 203 | logerror("WR: %d; ", BIT(data,6)); |
| 204 | logerror("RD: %d;\n", BIT(data,7)); |
| 205 | 205 | #endif |
| 206 | 206 | return data; |
| 207 | 207 | } |
src/mess/drivers/tsispch.c
| r10781 | r10782 | |
| 13 | 13 | * Successful compile |
| 14 | 14 | * Successful run |
| 15 | 15 | * Correctly Interleave 8086 CPU roms |
| 16 | * Debug LEDs hooked to popmessage |
| 16 | 17 | * |
| 17 | 18 | * TODO: |
| 18 | 19 | * Correct memory maps and io maps |
| r10781 | r10782 | |
| 21 | 22 | * Add dipswitches and jumpers |
| 22 | 23 | * Hook terminal to serial UARTS |
| 23 | 24 | * Everything else |
| 25 | * |
| 26 | * Notes: |
| 27 | * Text in rom indicates there is a test mode 'activated by switch s4 dash 7' |
| 24 | 28 | ******************************************************************************/ |
| 25 | 29 | #define ADDRESS_MAP_MODERN |
| 26 | 30 | |
| r10781 | r10782 | |
| 36 | 40 | DEVCB_NULL // for now... |
| 37 | 41 | }; |
| 38 | 42 | |
| 43 | WRITE16_MEMBER( tsispch_state::led_w ) |
| 44 | { |
| 45 | tsispch_state *state = machine->driver_data<tsispch_state>(); |
| 46 | UINT16 data2 = data >> 8; |
| 47 | state->statusLED = data2&0xFF; |
| 48 | //fprintf(stderr,"0x03400 LED write: %02X\n", data); |
| 49 | //popmessage("LED status: %02X\n", data2&0xFF); |
| 50 | #ifdef VERBOSE |
| 51 | logerror("8086: LED status: %02X\n", data2&0xFF); |
| 52 | #endif |
| 53 | popmessage("LED status: %x %x %x %x %x %x %x %x\n", BIT(data2,7), BIT(data2,6), BIT(data2,5), BIT(data2,4), BIT(data2,3), BIT(data2,2), BIT(data2,1), BIT(data2,0)); |
| 54 | } |
| 55 | |
| 39 | 56 | /* Reset */ |
| 40 | 57 | void tsispch_state::machine_reset() |
| 41 | 58 | { |
| r10781 | r10782 | |
| 52 | 69 | UINT32 *dspprg = (UINT32 *)machine->region("dspprg")->base(); |
| 53 | 70 | fprintf(stderr,"driver init\n"); |
| 54 | 71 | // unpack 24 bit data into 32 bit space |
| 72 | // TODO: unpack such that it can actually RUN as upd7725 code; this requires |
| 73 | // some minor shifting |
| 55 | 74 | for (int i = 0; i < 0x600; i+= 3) |
| 56 | 75 | { |
| 57 | 76 | *dspprg = dspsrc[0+i]<<24 | dspsrc[1+i]<<16 | dspsrc[2+i]<<8; |
| r10781 | r10782 | |
| 65 | 84 | |
| 66 | 85 | static ADDRESS_MAP_START(i8086_mem, ADDRESS_SPACE_PROGRAM, 16, tsispch_state) |
| 67 | 86 | ADDRESS_MAP_UNMAP_HIGH |
| 68 | | AM_RANGE(0x00000, 0x02BFF) AM_RAM // guess based on startup test |
| 69 | | //AM_RANGE(0x03400, 0x03401) //?? |
| 87 | AM_RANGE(0x00000, 0x02BFF) AM_RAM // unverified; tested on startup test |
| 88 | AM_RANGE(0x02C00, 0x02FFF) AM_RAM // unverified; 2F32-2F92 may be special ram for talking to the DSP? |
| 89 | //AM_RANGE(0x03200, 0x03201) // UART 1 |
| 90 | //AM_RANGE(0x03202, 0x03203) // UART 2 |
| 91 | AM_RANGE(0x03400, 0x03401) AM_WRITE(led_w) // write is the 8 debug leds; reading here may be dipswitches? |
| 70 | 92 | AM_RANGE(0xc0000, 0xfffff) AM_ROM // correct |
| 71 | 93 | ADDRESS_MAP_END |
| 72 | 94 | |
| r10781 | r10782 | |
| 130 | 152 | ROM_REGION( 0x400, "dspdata", 0) |
| 131 | 153 | ROM_LOAD( "dsp_data.bin", 0x0000, 0x0400, CRC(F4E4DD16) SHA1(6E184747DB2F26E45D0E02907105FF192E51BABA)) |
| 132 | 154 | |
| 155 | // mapping proms: |
| 156 | // L - always low; H - always high |
| 157 | // U77: unknown; input is ?; output bits 0bLLLLzyxH |
| 158 | // x - unknown |
| 159 | // y - unknown |
| 160 | // z - unknown |
| 161 | // |
| 162 | // U79: unknown; input is ?; output bits 0bLLLLyHHx |
| 163 | // x - unknown |
| 164 | // y - unknown |
| 165 | // |
| 166 | // U81: maps ROMS to C0000-FFFFF: input is A15-A19; output bits: 0bHyxHHHHH |
| 167 | // x - to /CE of roms 2 and 3 |
| 168 | // y - to /CE of roms 0 and 1 |
| 133 | 169 | ROM_REGION(0x1000, "proms", 0) |
| 134 | 170 | ROM_LOAD( "u77.bin", 0x0000, 0x0020, CRC(A88757FC) SHA1(9066D6DBC009D7A126D75B8461CA464DDF134412)) |
| 135 | 171 | ROM_LOAD( "u79.bin", 0x0020, 0x0020, CRC(A165B090) SHA1(BFC413C79915C68906033741318C070AD5DD0F6B)) |