Previous 15994 Revisions Next

r10782 Sunday 13th March, 2011 at 12:00:30 UTC by Jonathan Gevaryahu
pes.c: use BIT macros where appropriate
tsispch.c: improve memory map somewhat, add debug LEDs
[src/mess/drivers]pes.c tsispch.c
[src/mess/includes]tsispch.h

src/mess/includes/tsispch.h
r10781r10782
2828   UINT8 infifo[32];         // input fifo
2929   UINT8 infifo_tail_ptr;      // " tail
3030   UINT8 infifo_head_ptr;      // " head
31   UINT8 statusLED;         // status led
3132
3233   virtual void machine_reset();
34   DECLARE_WRITE16_MEMBER(led_w);
3335};
3436
3537
src/mess/drivers/pes.c
r10781r10782
169169   m_port3_state = data;
170170#ifdef DEBUG_PORTS
171171   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));
180180#endif
181181   // todo: poke serial handler here somehow?
182182}
r10781r10782
194194   data |= (tms5220_readyq_r(state->m_speech)<<3);
195195#ifdef DEBUG_PORTS
196196   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));
205205#endif
206206   return data;
207207}
src/mess/drivers/tsispch.c
r10781r10782
1313*  Successful compile
1414*  Successful run
1515*  Correctly Interleave 8086 CPU roms
16*  Debug LEDs hooked to popmessage
1617*
1718*  TODO:
1819*  Correct memory maps and io maps
r10781r10782
2122*  Add dipswitches and jumpers
2223*  Hook terminal to serial UARTS
2324*  Everything else
25*
26*  Notes:
27*  Text in rom indicates there is a test mode 'activated by switch s4 dash 7'
2428******************************************************************************/
2529#define ADDRESS_MAP_MODERN
2630
r10781r10782
3640   DEVCB_NULL // for now...
3741};
3842
43WRITE16_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
3956/* Reset */
4057void tsispch_state::machine_reset()
4158{
r10781r10782
5269   UINT32 *dspprg = (UINT32 *)machine->region("dspprg")->base();
5370   fprintf(stderr,"driver init\n");
5471    // 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
5574        for (int i = 0; i < 0x600; i+= 3)
5675        {
5776            *dspprg = dspsrc[0+i]<<24 | dspsrc[1+i]<<16 | dspsrc[2+i]<<8;
r10781r10782
6584
6685static ADDRESS_MAP_START(i8086_mem, ADDRESS_SPACE_PROGRAM, 16, tsispch_state)
6786   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?
7092   AM_RANGE(0xc0000, 0xfffff) AM_ROM // correct
7193ADDRESS_MAP_END
7294
r10781r10782
130152   ROM_REGION( 0x400, "dspdata", 0)
131153   ROM_LOAD( "dsp_data.bin", 0x0000, 0x0400, CRC(F4E4DD16) SHA1(6E184747DB2F26E45D0E02907105FF192E51BABA))
132154
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
133169   ROM_REGION(0x1000, "proms", 0)
134170   ROM_LOAD( "u77.bin", 0x0000, 0x0020, CRC(A88757FC) SHA1(9066D6DBC009D7A126D75B8461CA464DDF134412))
135171   ROM_LOAD( "u79.bin", 0x0020, 0x0020, CRC(A165B090) SHA1(BFC413C79915C68906033741318C070AD5DD0F6B))

Previous 15994 Revisions Next


© 1998-2018 The MESS Team