Previous 15994 Revisions Next

r12077 Sunday 26th June, 2011 at 21:17:34 UTC by Jonathan Gevaryahu
Prose2000: update a lot of comments, bare beginnings of upd7720 px line and int support. [Lord Nightmare]
[src/mess/drivers]tsispch.c

src/mess/drivers/tsispch.c
r12076r12077
1818*  Attached i8251a uart at u15
1919*  Added dipswitch array S4
2020*  Attached 8259 PIC
21   * IR0 = upd7720 p0 pin masked by something, not hooked up yet
21   * IR0 = upd7720 p0 pin masked by (probably peripheral bit 0)
2222   * IR1 = i8251 rxrdy
2323   * IR2 = i8251 txempty
2424   * IR3 = i8251 txrdy
r12076r12077
3333*  Correctly implement UPD7720 cpu core to avoid needing revolting conversion code; this probably involves overriding and duplicating much of the exec_xx sections of the 7725 core
3434*  Correct memory maps and io maps, and figure out what all the proms do - mostly done
3535*  8259 PIC: figure out where IR4-7 come from, if anywhere.
36*  UPD7720: hook up p0 and p1 as outputs, and figure out how IR0 is masked from p0.
36*  UPD7720 and 8259: hook up p0 and p1 as outputs, and figure out how 8259 IR0 is masked from 7720 p0.
3737*  Add other dipswitches and jumpers (these may actually just control clock dividers for the two 8251s)
3838*  Everything else
3939*
r12076r12077
4646*    the low 8 bits (7-0) are Sw4
4747*    the high 8 bits:
4848*    Bit F E D C B A 9 8
49*        | | | | | | | \- unknown, possibly related to 7720 p0 int mask
49*        | | | | | | | \- unknown but used, probably control (1=allow 0=mask?) 7720 p0 int to 8259 ir0?
5050*        | | | | | | \--- LED 6 control (0 = on)
5151*        | | | | | \----- LED 5 control (0 = on)
5252*        | | | | \------- LED 4 control (0 = on)
5353*        | | | \--------- LED 3 control (0 = on)
54*        | | \----------- unknown
54*        | | \----------- unknown, possibly unused?
5555*        | \------------- UPD7720 RESET line (0 = high/in reset, 1 = low/running)
56*        \--------------- unknown
56*        \--------------- unknown, possibly unused? but might possibly related to 7720 p0->8259 as well?
5757*
58* in other words:
59*                    LEDS 6    5    4    3
60*    write of 0100 - LEDS on,  on,  on,  on (7720 mask int changed? needs further test)
61*    write of 0200 - LEDS off, on,  on,  on (led 6 control)
62*    write of 0400 - LEDS on,  off, on,  on (led 5 control)
63*    write of 0800 - LEDS on,  on,  off, on (led 4 control)
64*    write of 1000 - LEDS on,  on,  on,  off(led 3 control)
65*    write of 2000 - LEDS on,  on,  on,  on (?)
66*    write of 4000 - LEDS on,  on,  on,  on (changes upd7720 RESET line status from high to low)
67*    write of 8000 - LEDS on,  on,  on,  on (?)
68*
6958*    When the unit is idle, leds 5 and 3 are on and upd7720 reset is low (write of 0b?1?0101?.
59*    On all character writes from i8251, bit 8 is unset, then set again, possibly to avoid interrupt clashes?
7060*
7161*  Bootup notes:
7262*    D3109: checks if 0x80 (S4-8) is set: if set, continue, else jump to D3123
r12076r12077
126116/*
127117   Devices and handlers
128118 */
119//upd7720 (TODO: hook up p0, p1, int)
120static NECDSP_INTERFACE( upd7720_config )
121{
122   DEVCB_NULL,
123   DEVCB_NULL,
124   DEVCB_NULL
125};
129126
127
130128/*****************************************************************************
131129 USART 8251 and Terminal stuff
132130*****************************************************************************/
r12076r12077
147145
148146const msm8251_interface msm8251_config =
149147{
150   DEVCB_NULL, // in rxd, serial
148   DEVCB_NULL, // in rxd, serial (todo: proper hookup, currently using hack w/msm8251_recieve_character())
151149   DEVCB_NULL, // out txd, serial
152150   DEVCB_NULL, // in dsr
153151   DEVCB_NULL, // out dtr
r12076r12077
205203
206204WRITE8_MEMBER( tsispch_state::peripheral_w )
207205{
208   /* These are the 4 debug leds on the pcb inside the case.
209       They are called on the silkscreen, '6','5','4',and '3', and
210       are connected to bits 1, 2, 3, and 4 of this register.
211       Bit 4 also connects to the 'talking' LED on the front panel.
212       When 0 is written to a bit, the led turns on.
213       See notes at beginning of file for more info.
214    */
206   /* This controls the four LEDS, the RESET line for the upd77p20,
207   and (probably) the p0-to-ir0 masking of the upd77p20; there are two
208   unknown and seemingly unused bits as well.
209   see the top of the file for more info.
210   */
215211   tsispch_state *state = machine().driver_data<tsispch_state>();
216212   state->m_paramReg = data;
217213   cputag_set_input_line(machine(), "dsp", INPUT_LINE_RESET, BIT(data,6)?CLEAR_LINE:ASSERT_LINE);
218214#ifdef DEBUG_PARAM
219   //fprintf(stderr,"8086: Parameter Reg written: UNK7: %d, DSPRST6: %d; UNK5: %d; LED4: %d; LED3: %d; LED2: %d; LED1: %d; UNK0: %d\n", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1), BIT(data,0));
220   logerror("8086: Parameter Reg written: UNK7: %d, DSPRST6: %d; UNK5: %d; LED4: %d; LED3: %d; LED2: %d; LED1: %d; UNK0: %d\n", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1), BIT(data,0));
215   //fprintf(stderr,"8086: Parameter Reg written: UNK7: %d, DSPRST6: %d; UNK5: %d; LED4: %d; LED3: %d; LED2: %d; LED1: %d; DSPIRQMASK: %d\n", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1), BIT(data,0));
216   logerror("8086: Parameter Reg written: UNK7: %d, DSPRST6: %d; UNK5: %d; LED4: %d; LED3: %d; LED2: %d; LED1: %d; DSPIRQMASK: %d\n", BIT(data,7), BIT(data,6), BIT(data,5), BIT(data,4), BIT(data,3), BIT(data,2), BIT(data,1), BIT(data,0));
221217#endif
222218   popmessage("LEDS: 6/Talking:%d 5:%d 4:%d 3:%d\n", 1-BIT(data,1), 1-BIT(data,2), 1-BIT(data,3), 1-BIT(data,4));
223219}
r12076r12077
339335     0   0   x   x    0   x   1   0    *   *  *  *   *  *  *  *   *  *  *  s  6264*2 SRAM 3rd quarter
340336     0   0   x   x    0   x   1   1    0   0  0  x   x  x  x  x   x  x  *  x  iP8251A @ U15
341337     0   0   x   x    0   x   1   1    0   0  1  x   x  x  x  x   x  x  *  x  AMD P8259A PIC
342     0   0   x   x    0   x   1   1    0   1  0  x   x  x  x  x   x  x  x  *  LEDS and dipswitches?
338     0   0   x   x    0   x   1   1    0   1  0  x   x  x  x  x   x  x  x  *  LEDS, dipswitches, and UPD77P20 control lines
343339     0   0   x   x    0   x   1   1    0   1  1  x   x  x  x  x   x  x  *  x  UPD77P20 data/status
344340     0   0   x   x    0   x   1   1    1   x  x                               Open bus, verified (returns 0x00EA)
345341     0   0   x   x    1   x                                                   Open bus? (or maybe status?) (returns 0xFA,B,C,FFF)
346     0   1                                                                    Open bus, verfiied (returns 0x00EA)
342     0   1                                                                    Open bus, verified (returns 0x00EA)
347343     1   0                                                                    Open bus, verified (returns 0x00EA)
348344     1   1   0   *    *   *   *   *    *   *  *  *   *  *  *  *   *  *  *  s  ROMs 2 and 3
349345     1   1   1   *    *   *   *   *    *   *  *  *   *  *  *  *   *  *  *  s  ROMs 0 and 1
r12076r12077
398394   PORT_DIPNAME( 0x20, 0x20, "S4-6") PORT_DIPLOCATION("SW4:6")
399395   PORT_DIPSETTING(   0x20, DEF_STR( Off ) )
400396   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
401   PORT_DIPNAME( 0x40, 0x40, "Self Test") PORT_DIPLOCATION("SW4:7")
397   PORT_DIPNAME( 0x40, 0x40, "S4-7: Self Test") PORT_DIPLOCATION("SW4:7")
402398   PORT_DIPSETTING(   0x40, DEF_STR( Off ) )
403399   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
404400   PORT_DIPNAME( 0x80, 0x80, "S4-8") PORT_DIPLOCATION("SW4:8")
r12076r12077
421417    MCFG_CPU_ADD("dsp", UPD7725, 8000000) /* VERIFIED clock, unknown divider; correct dsp type is UPD77P20 */
422418    MCFG_CPU_PROGRAM_MAP(dsp_prg_map)
423419    MCFG_CPU_DATA_MAP(dsp_data_map)
420    MCFG_CPU_CONFIG(upd7720_config)
424421
425422    /* PIC 8259 */
426423    MCFG_PIC8259_ADD("pic8259", pic8259_config)
r12076r12077
430427
431428    /* sound hardware */
432429    //MCFG_SPEAKER_STANDARD_MONO("mono")
433    //MCFG_SOUND_ADD("dac", DAC, 0) /* TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be fun to connect up */
430    //MCFG_SOUND_ADD("dac", DAC, 0) /* TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up */
434431    //MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
435432
436433    MCFG_FRAGMENT_ADD( generic_terminal )
r12076r12077
460457   // L - always low; H - always high
461458   // U77: unknown (what does this do?)
462459   //      input is A19 for I4, A18 for I3, A15 for I2, A13 for I1, A12 for I0
463   //      output bits 0bLLLLzyxH
460   //      output bits 0bLLLLzyxH (TODO: recheck)
464461   //      bit - function
465462   //      7, 6, 5, 4 - seem unconnected?
466463   //      3 - connection unknown, low in the RAM, ROM, and Peripheral memory areas
467464   //      2 - connection unknown, low in the RAM and ROM memory areas
468   //      1 - unknown, always high
465   //      1 - unknown, always high (TODO: recheck)
469466   //      0 - unknown, always high
470467   //
471468   // U79: SRAM and peripheral mapping:
r12076r12077
484481   //              inputs: S0 - A9; S1 - A10; S2 - A11
485482   //              /Y0 - /CS (pin 11) of iP8251A at U15
486483   //              /Y1 - /CS (pin 1) of AMD 8259A at U4
487   //              /Y2 - pins 1, 4, 9 (1A, 2A, 3A inputs) of 74HCT32 Quad OR gate at U58 <wip, involves LEDS?>
484   //              /Y2 - pins 1, 4, 9 (1A, 2A, 3A inputs) of 74HCT32 Quad OR gate at U58 <wip, this is the 'peripheral' register, which deals with upd7720 control lines, LEDS and dipswitches>
488485   //              /Y3 - pin 26 (/CS) of UPD77P20 at U29
489486   //              /Y4 thru /Y7 - seem unconnected SO FAR? <wip>
490487   //          The 74S138N at U78: <wip>
491   //              /EN3 - ?
488   //              /EN3 - ? (TODO: figure these out)
492489   //              /EN2 - ?
493490   //              inputs: S0 - A18; S1 - A19; S2 - Pulled to GND
494491   //              /Y0 - ?
495492   //              /Y1 - ?
496493   //              /Y2 - ?
497   //              /Y3 - connects somewhere
494   //              /Y3 - connects somewhere, only active when A18 and A19 are high, possibly a rom bus buffer enable? (TODO: figure out what this does)
498495   //              /Y4-/Y7 - never used since S2 is pulled to GND
499496   //      2 - to /CS1 on 6264 SRAMs at U63 and U66
500497   //      1 - to /CS1 on 6264 SRAMs at U62 and U65

Previous 15994 Revisions Next


© 1998-2018 The MESS Team