Previous 15994 Revisions Next

r4260 Friday 13th February, 2009 at 13:22:07 UTC by Dirk Best
[ATARIST] Updated to use the new centronics interface
[docs]messnew.txt
[src/mess/drivers]abc80.c abc80x.c atarist.c
[src/mess/includes]atarist.h

src/mess/includes/atarist.h
r4259r4260
99#define MC68901_TAG   "mc68901"
1010#define LMC1992_TAG "lmc1992"
1111#define WD1772_TAG   "wd1772"
12#define CENTRONICS_TAG   "centronics"
1213
1314// Atari ST
1415
r4259r4260
131132   const device_config *mc68901;
132133   const device_config *lmc1992;
133134   const device_config *wd1772;
135   const device_config *centronics;
134136
135137   /* timers */
136138   emu_timer *glue_timer;
src/mess/drivers/abc80.c
r4259r4260
8080#include "includes/abc80.h"
8181
8282/* Components */
83#include "machine/centroni.h"
8483#include "cpu/z80/z80daisy.h"
8584#include "machine/z80pio.h"
8685#include "sound/sn76477.h"
r4259r4260
199198
200199      for (col = 0; col < 8; col++)
201200      {
202         if (BIT(data, col))
201         if (BIT(data, col))
203202         {
204203            /* latch key data */
205204            state->key_data = abc80_keycodes[row + (table * 7)][col];
src/mess/drivers/atarist.c
r4259r4260
44#include "cpu/m6800/m6800.h"
55#include "devices/basicdsk.h"
66#include "devices/cartslot.h"
7#include "devices/printer.h"
8#include "machine/centroni.h"
7#include "machine/ctronics.h"
98#include "includes/serial.h"
109#include "machine/6850acia.h"
1110#include "machine/68901mfp.h"
r4259r4260
134133static WRITE16_HANDLER( atarist_fdc_data_w )
135134{
136135   atarist_state *state = space->machine->driver_data;
137   
136
138137   if (state->fdc_mode & ATARIST_FLOPPY_MODE_SECTOR_COUNT)
139138   {
140139      if (data == 0)
r4259r4260
12931292   // 0x08 = RTS
12941293   // 0x10 = DTR
12951294
1296   centronics_write_handshake(space->machine,0, BIT(data, 5) ? 0 : CENTRONICS_STROBE, CENTRONICS_STROBE);
1295   centronics_strobe_w(state->centronics, BIT(data, 5));
12971296
12981297   // 0x40 = General Purpose Output
12991298   // 0x80 = Reserved
r4259r4260
13011300
13021301static WRITE8_HANDLER( ym2149_port_b_w )
13031302{
1304   centronics_write_data(space->machine,0, data);
1303   atarist_state *state = space->machine->driver_data;
1304   centronics_data_w(state->centronics, 0, data);
13051305}
13061306
13071307static const ay8910_interface ym2149_interface =
r4259r4260
14061406
14071407   atarist_state *state = device->machine->driver_data;
14081408
1409   UINT8 data = (centronics_read_handshake(device->machine,0) & CENTRONICS_NOT_BUSY) >> 7;
1409   UINT8 data = centronics_busy_r(state->centronics);
14101410
14111411   mc68901_tai_w(device, data & 0x01);
14121412
r4259r4260
14391439   DEVCB_CPU_INPUT_LINE(M68000_TAG, M68K_IRQ_6)      /* interrupt */
14401440};
14411441
1442static const CENTRONICS_CONFIG atarist_centronics_config[1] =
1443{
1444   {
1445      PRINTER_IBM,
1446      NULL
1447   }
1448};
14491442
14501443static void atarist_configure_memory(running_machine *machine)
14511444{
r4259r4260
15211514   /* configure RAM banking */
15221515   atarist_configure_memory(machine);
15231516
1524   /* configure devices */
1525   centronics_config(machine, 0, atarist_centronics_config);
1526
15271517   /* set CPU interrupt callback */
15281518   cpu_set_irq_callback(cputag_get_cpu(machine, M68000_TAG), atarist_int_ack);
15291519
15301520   /* find devices */
15311521   state->mc68901 = devtag_get_device(machine, MC68901, MC68901_TAG);
15321522    state->wd1772 = devtag_get_device(machine, WD1772, WD1772_TAG);
1523    state->centronics = devtag_get_device(machine, CENTRONICS, CENTRONICS_TAG);
15331524
15341525   /* register for state saving */
15351526   atarist_state_save(machine);
r4259r4260
15641555
15651556   atarist_state *state = device->machine->driver_data;
15661557
1567   UINT8 data = (centronics_read_handshake(device->machine,0) & CENTRONICS_NOT_BUSY) >> 7;
1558   UINT8 data = centronics_busy_r(state->centronics);
15681559
15691560   data |= (state->acia_irq << 4);
15701561   data |= (state->fdc_irq << 5);
r4259r4260
16171608   /* configure RAM banking */
16181609   atarist_configure_memory(machine);
16191610
1620   /* configure devices */
1621   centronics_config(machine, 0, atarist_centronics_config);
1622   
16231611   /* set CPU interrupt callback */
16241612   cpu_set_irq_callback(cputag_get_cpu(machine, M68000_TAG), atarist_int_ack);
16251613
r4259r4260
16311619   state->mc68901 = devtag_get_device(machine, MC68901, MC68901_TAG);
16321620    state->wd1772 = devtag_get_device(machine, WD1772, WD1772_TAG);
16331621   state->lmc1992 = devtag_get_device(machine, LMC1992, LMC1992_TAG);
1622   state->centronics = devtag_get_device(machine, CENTRONICS, CENTRONICS_TAG);
16341623
16351624   /* register for state saving */
16361625   atariste_state_save(machine);
r4259r4260
16931682   // 0x08 = RTS
16941683   // 0x10 = DTR
16951684
1696   centronics_write_handshake(space->machine, 0, (data & 0x20) ? 0 : CENTRONICS_STROBE, CENTRONICS_STROBE);
1685   centronics_strobe_w(state->centronics, BIT(data, 5));
16971686
16981687   // 0x40 = IDE RESET
16991688   // 0x80 = FDD_DENSE_SEL
r4259r4260
17401729
17411730   atarist_state *state = device->machine->driver_data;
17421731
1743   UINT8 data = (centronics_read_handshake(device->machine, 0) & CENTRONICS_NOT_BUSY) >> 7;
1732   UINT8 data = centronics_busy_r(state->centronics);
17441733
17451734   data |= (state->acia_irq << 4);
17461735   data |= (state->fdc_irq << 5);
r4259r4260
17711760   /* configure RAM banking */
17721761   stbook_configure_memory(machine);
17731762
1774   /* configure devices */
1775   centronics_config(machine, 0, atarist_centronics_config);
1776
17771763   /* set CPU interrupt callback */
17781764   cpu_set_irq_callback(cputag_get_cpu(machine, M68000_TAG), atarist_int_ack);
17791765
17801766   /* find devices */
17811767   state->mc68901 = devtag_get_device(machine, MC68901, MC68901_TAG);
17821768    state->wd1772 = devtag_get_device(machine, WD1772, WD1772_TAG);
1769    state->centronics = devtag_get_device(machine, CENTRONICS, CENTRONICS_TAG);
17831770
17841771   /* register for state saving */
17851772   atariste_state_save(machine);
r4259r4260
18441831   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
18451832
18461833   /* printer */
1847   MDRV_PRINTER_ADD("printer")
1834   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
18481835
18491836   /* acia */
18501837   MDRV_ACIA6850_ADD("acia_0", acia_ikbd_intf)
18511838   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
1852   
1839
18531840   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1854   
1841
18551842   MDRV_IMPORT_FROM(atarist_cartslot)
18561843MACHINE_DRIVER_END
18571844
r4259r4260
19061893   MDRV_LMC1992_ADD(LMC1992_TAG /* ,atariste_lmc1992_intf */)
19071894
19081895   /* printer */
1909   MDRV_PRINTER_ADD("printer")
1896   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
19101897
19111898   /* acia */
19121899   MDRV_ACIA6850_ADD("acia_0", acia_ikbd_intf)
19131900   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
1914   
1901
19151902   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1916   
1903
19171904   MDRV_IMPORT_FROM(atarist_cartslot)
19181905MACHINE_DRIVER_END
19191906
r4259r4260
19621949   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
19631950
19641951   /* printer */
1965   MDRV_PRINTER_ADD("printer")
1952   MDRV_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
19661953
19671954   /* acia */
19681955   MDRV_ACIA6850_ADD("acia_0", stbook_acia_ikbd_intf)
19691956   MDRV_ACIA6850_ADD("acia_1", acia_midi_intf)
1970   
1957
19711958   MDRV_WD1772_ADD(WD1772_TAG, atarist_wd17xx_interface )
1972   
1959
19731960   MDRV_IMPORT_FROM(atarist_cartslot)
19741961MACHINE_DRIVER_END
19751962
src/mess/drivers/abc80x.c
r4259r4260
6868/* Components */
6969#include "cpu/z80/z80.h"
7070#include "cpu/z80/z80daisy.h"
71#include "machine/centroni.h"
7271#include "includes/serial.h"
7372#include "machine/z80ctc.h"
7473#include "machine/z80sio.h"
r4259r4260
212211{
213212   abc800_state *state = machine->driver_data;
214213   const address_space *program = cputag_get_address_space(machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
215   
214
216215   if (state->fetch_charram)
217216   {
218217      /* HR video RAM selected */
r4259r4260
267266         UINT16 start_addr = 0x1000 * (bank - 1);
268267         UINT16 end_addr = start_addr + 0xfff;
269268         UINT32 videoram_offset = (videoram_start + start_addr) & videoram_mask;
270         
269
271270         //logerror("%04x-%04x: Video RAM %04x (32K)\n", start_addr, end_addr, videoram_offset);
272271
273272         memory_install_readwrite8_handler(program, start_addr, end_addr, 0, 0, SMH_BANK(bank), SMH_BANK(bank));
r4259r4260
281280
282281         UINT16 start_addr = 0x1000 * (bank - 1);
283282         UINT16 end_addr = start_addr + 0xfff;
284         
283
285284         //logerror("%04x-%04x: Work RAM (32K)\n", start_addr, end_addr);
286285
287286         memory_install_readwrite8_handler(program, start_addr, end_addr, 0, 0, SMH_BANK(bank), SMH_BANK(bank));
r4259r4260
356355         UINT16 start_addr = 0x1000 * (bank - 1);
357356         UINT16 end_addr = start_addr + 0xfff;
358357         UINT32 videoram_offset = (videoram_start + start_addr) & videoram_mask;
359         
358
360359         //logerror("%04x-%04x: Video RAM %04x (30K)\n", start_addr, end_addr, videoram_offset);
361360
362361         if (start_addr == 0x7000)
r4259r4260
782781
783782   z80ctc_trg_w(z80ctc, 1, 1);
784783   z80ctc_trg_w(z80ctc, 1, 0);
785   
784
786785   z80ctc_trg_w(z80ctc, 2, 1);
787786   z80ctc_trg_w(z80ctc, 2, 0);
788787}
r4259r4260
985984static WRITE_LINE_DEVICE_HANDLER( abc806_dart_dtrb_w )
986985{
987986   abc806_state *driver_state = device->machine->driver_data;
988   
987
989988   driver_state->keydtr = state;
990989
991990   abc806_bankswitch(device->machine);
r4259r4260
12091208   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
12101209   MDRV_SOUND_CONFIG_DISCRETE(abc800)
12111210   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
1212   
1211
12131212   /* peripheral hardware */
12141213   MDRV_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
12151214   MDRV_TIMER_ADD_PERIODIC("ctc", ctc_tick, HZ(ABC800_X01/2/2/2))
r4259r4260
12441243   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
12451244   MDRV_SOUND_CONFIG_DISCRETE(abc800)
12461245   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
1247   
1246
12481247   /* peripheral hardware */
12491248   MDRV_Z80CTC_ADD(Z80CTC_TAG, ABC800_X01/2/2, ctc_intf)
12501249   MDRV_TIMER_ADD_PERIODIC("ctc", ctc_tick, HZ(ABC800_X01/2/2/2))
r4259r4260
13051304
13061305   MDRV_MACHINE_START(abc806)
13071306   MDRV_MACHINE_RESET(abc806)
1308   
1307
13091308   /* video hardware */
13101309   MDRV_IMPORT_FROM(abc806_video)
13111310
r4259r4260
13491348   --------
13501349   55 10761-01      "old" controller
13511350   55 10828-01      "old" controller
1352   55 20900-0x     
1351   55 20900-0x
13531352   55 21046-11      Luxor Conkort   25 pin D-sub connector
13541353   55 21046-21      Luxor Conkort   34 pin FDD connector
13551354   55 21046-41      Luxor Conkort   both of the above
docs/messnew.txt
r4259r4260
2222
2323- [APPLE1] Fixed character layout.  [rhester72]
2424
25- [ATARIST] Updated to use the new centronics interface.  [Dirk Best]
26
2527- [ATOM] Rewrote printer interface.  [Dirk Best]
2628
2729- [CHANNELF] Added support for "new" sound.  [Fredric QJ BlĂ„holtz]

Previous 15994 Revisions Next


© 1998-2018 The MESS Team