Previous 15994 Revisions Next

r9952 Friday 7th January, 2011 at 15:35:35 UTC by Curt Coder
[ACE] Added support for 32K RAM expansion, EME Printer Board, Big Mouth speech board, fixed display area.
[docs]messnew.txt
[src/emu/sound]sp0256.c sp0256.h
[src/mess]mess.mak
[src/mess/drivers]ace.c
[src/mess/formats]ace_ace.c* ace_ace.h*
[src/mess/includes]ace.h
[src/mess/machine]ace.c

src/emu/sound/sp0256.c
r9951r9952
12701270   return;
12711271}
12721272
1273READ_LINE_DEVICE_HANDLER( sp0256_sby_r )
1274{
1275   sp0256_state *sp = get_safe_token(device);
1276
1277   return sp->sby_line;
1278}
1279
12731280READ16_DEVICE_HANDLER( spb640_r )
12741281{
12751282   sp0256_state *sp = get_safe_token(device);
src/emu/sound/sp0256.h
r9951r9952
6262void sp0256_bitrevbuff(UINT8 *buffer, unsigned int start, unsigned int length);
6363
6464WRITE8_DEVICE_HANDLER( sp0256_ALD_w );
65READ_LINE_DEVICE_HANDLER( sp0256_sby_r );
6566
6667READ16_DEVICE_HANDLER( spb640_r );
6768WRITE16_DEVICE_HANDLER( spb640_w );
src/mess/machine/ace.c
r9951r9952
1/***************************************************************************
2
3  machine.c
4
5  Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
6  I/O ports)
7
8***************************************************************************/
9
10#include "emu.h"
11#include "cpu/z80/z80.h"
12#include "imagedev/snapquik.h"
13#include "includes/ace.h"
14
15
16
17/* Load in .ace files. These are memory images of 0x2000 to 0x7fff
18   and compressed as follows:
19
20   ED 00        : End marker
21   ED <cnt> <byt>   : repeat <byt> count <cnt:1-240> times
22   <byt>        : <byt>
23*/
24
25
26/******************************************************************************
27 Snapshot Handling
28******************************************************************************/
29
30SNAPSHOT_LOAD(ace)
31{
32   UINT8 *RAM = image.device().machine->region(Z80_TAG)->base();
33   device_t *cpu = image.device().machine->device(Z80_TAG);
34   address_space *space = cputag_get_address_space(image.device().machine, Z80_TAG, ADDRESS_SPACE_PROGRAM);
35   unsigned char ace_repeat, ace_byte, loop;
36   int done=0, ace_index=0x2000;
37
38   if (ram_get_size(image.device().machine->device(RAM_TAG)) < 16*1024)
39   {
40      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "At least 16KB RAM expansion required");
41      image.message("At least 16KB RAM expansion required");
42      return IMAGE_INIT_FAIL;
43   }
44
45   logerror("Loading file %s.\r\n", image.filename());
46   while (!done && (ace_index < 0x8001))
47   {
48      image.fread( &ace_byte, 1);
49      if (ace_byte == 0xed)
50      {
51         image.fread(&ace_byte, 1);
52         switch (ace_byte)
53         {
54         case 0x00:
55               logerror("File loaded!\r\n");
56               done = 1;
57               break;
58         case 0x01:
59               image.fread(&ace_byte, 1);
60               RAM[ace_index++] = ace_byte;
61               break;
62         default:
63               image.fread(&ace_repeat, 1);
64               for (loop = 0; loop < ace_byte; loop++)
65                  RAM[ace_index++] = ace_repeat;
66               break;
67         }
68      }
69      else
70         RAM[ace_index++] = ace_byte;
71   }
72
73   logerror("Decoded %X bytes.\r\n", ace_index-0x2000);
74
75   if (!done)
76   {
77      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "EOF marker not found");
78      image.message("EOF marker not found");
79      return IMAGE_INIT_FAIL;
80   }
81
82        // patch CPU registers
83        // Some games do not follow the standard, and have rubbish in the CPU area. So,
84        // we check that some other bytes are correct.
85        // 2080 = memory size of original machine, should be 0000 or 8000 or C000.
86        // 2118 = new stack pointer, do not use if between 8000 and FF00.
87
88   ace_index = RAM[0x2080] | (RAM[0x2081] << 8);
89
90   if ((ace_index & 0x3FFF)==0)
91   {
92      cpu_set_reg(cpu, Z80_AF, RAM[0x2100] | (RAM[0x2101] << 8));
93      cpu_set_reg(cpu, Z80_BC, RAM[0x2104] | (RAM[0x2105] << 8));
94      cpu_set_reg(cpu, Z80_DE, RAM[0x2108] | (RAM[0x2109] << 8));
95      cpu_set_reg(cpu, Z80_HL, RAM[0x210c] | (RAM[0x210d] << 8));
96      cpu_set_reg(cpu, Z80_IX, RAM[0x2110] | (RAM[0x2111] << 8));
97      cpu_set_reg(cpu, Z80_IY, RAM[0x2114] | (RAM[0x2115] << 8));
98      cpu_set_reg(cpu, STATE_GENPC, RAM[0x211c] | (RAM[0x211d] << 8));
99      cpu_set_reg(cpu, Z80_AF2, RAM[0x2120] | (RAM[0x2121] << 8));
100      cpu_set_reg(cpu, Z80_BC2, RAM[0x2124] | (RAM[0x2125] << 8));
101      cpu_set_reg(cpu, Z80_DE2, RAM[0x2128] | (RAM[0x2129] << 8));
102      cpu_set_reg(cpu, Z80_HL2, RAM[0x212c] | (RAM[0x212d] << 8));
103      cpu_set_reg(cpu, Z80_IM, RAM[0x2130]);
104      cpu_set_reg(cpu, Z80_IFF1, RAM[0x2134]);
105      cpu_set_reg(cpu, Z80_IFF2, RAM[0x2138]);
106      cpu_set_reg(cpu, Z80_I, RAM[0x213c]);
107      cpu_set_reg(cpu, Z80_R, RAM[0x2140]);
108
109      if ((RAM[0x2119] < 0x80) || !ace_index)
110         cpu_set_reg(cpu, STATE_GENSP, RAM[0x2118] | (RAM[0x2119] << 8));
111   }
112
113   /* Copy data to the address space */
114   for (ace_index = 0x2000; ace_index < 0x8000; ace_index++)
115      space->write_byte(ace_index, RAM[ace_index]);
116
117   return IMAGE_INIT_PASS;
118}
src/mess/includes/ace.h
r9951r9952
44 *
55 ****************************************************************************/
66
7#pragma once
8
79#ifndef ACE_H_
810#define ACE_H_
911
10#include "machine/ram.h"
1112#define Z80_TAG         "z0"
1213#define AY8910_TAG      "ay8910"
14#define I8255_TAG      "i8255"
15#define SP0256AL2_TAG   "ic1"
16#define Z80PIO_TAG      "z80pio"
1317#define SPEAKER_TAG      "speaker"
1418#define CASSETTE_TAG   "cassette"
19#define CENTRONICS_TAG   "centronics"
1520#define SCREEN_TAG      "screen"
1621
1722class ace_state : public driver_device
r9951r9952
2227        m_maincpu(*this, Z80_TAG),
2328        m_speaker(*this, SPEAKER_TAG),
2429        m_cassette(*this, CASSETTE_TAG),
30        m_centronics(*this, CENTRONICS_TAG),
2531        m_ram(*this, RAM_TAG)
2632    { }
2733
2834   required_device<cpu_device> m_maincpu;
2935   required_device<device_t> m_speaker;
3036   required_device<device_t> m_cassette;
37   required_device<device_t> m_centronics;
3138   required_device<device_t> m_ram;
3239
3340   virtual void machine_start();
r9951r9952
3643
3744   DECLARE_READ8_MEMBER( io_r );
3845   DECLARE_WRITE8_MEMBER( io_w );
46   DECLARE_READ8_MEMBER( pio_pa_r );
47   DECLARE_WRITE8_MEMBER( pio_pa_w );
3948
4049   UINT8 *m_video_ram;
4150   UINT8 *m_char_ram;
4251};
4352
44
45/*----------- defined in machine/ace.c -----------*/
46
47
48SNAPSHOT_LOAD(ace);
49
50
51/*----------- defined in video/ace.c -----------*/
52
5353#endif /* ACE_H_ */
src/mess/formats/ace_ace.c
r0r9952
1/*********************************************************************
2
3    ace_ace.c
4
5    Format code for Jupiter Ace snapshot files
6
7*********************************************************************/
8
9#include "emu.h"
10#include "ace_ace.h"
11#include "cpu/z80/z80.h"
12#include "machine/ram.h"
13
14/* Load in .ace files. These are memory images of 0x2000 to 0x7fff
15   and compressed as follows:
16
17   ED 00        : End marker
18   ED <cnt> <byt>   : repeat <byt> count <cnt:1-240> times
19   <byt>        : <byt>
20*/
21
22/******************************************************************************
23 Snapshot Handling
24******************************************************************************/
25
26SNAPSHOT_LOAD( ace )
27{
28   cpu_device *cpu = image.device().machine->firstcpu;
29   UINT8 *RAM = image.device().machine->region(cpu->tag())->base();
30   address_space *space = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM);
31   unsigned char ace_repeat, ace_byte, loop;
32   int done=0, ace_index=0x2000;
33
34   if (ram_get_size(image.device().machine->device(RAM_TAG)) < 16*1024)
35   {
36      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "At least 16KB RAM expansion required");
37      image.message("At least 16KB RAM expansion required");
38      return IMAGE_INIT_FAIL;
39   }
40
41   logerror("Loading file %s.\r\n", image.filename());
42   while (!done && (ace_index < 0x8001))
43   {
44      image.fread( &ace_byte, 1);
45      if (ace_byte == 0xed)
46      {
47         image.fread(&ace_byte, 1);
48         switch (ace_byte)
49         {
50         case 0x00:
51               logerror("File loaded!\r\n");
52               done = 1;
53               break;
54         case 0x01:
55               image.fread(&ace_byte, 1);
56               RAM[ace_index++] = ace_byte;
57               break;
58         default:
59               image.fread(&ace_repeat, 1);
60               for (loop = 0; loop < ace_byte; loop++)
61                  RAM[ace_index++] = ace_repeat;
62               break;
63         }
64      }
65      else
66         RAM[ace_index++] = ace_byte;
67   }
68
69   logerror("Decoded %X bytes.\r\n", ace_index-0x2000);
70
71   if (!done)
72   {
73      image.seterror(IMAGE_ERROR_INVALIDIMAGE, "EOF marker not found");
74      image.message("EOF marker not found");
75      return IMAGE_INIT_FAIL;
76   }
77
78        // patch CPU registers
79        // Some games do not follow the standard, and have rubbish in the CPU area. So,
80        // we check that some other bytes are correct.
81        // 2080 = memory size of original machine, should be 0000 or 8000 or C000.
82        // 2118 = new stack pointer, do not use if between 8000 and FF00.
83
84   ace_index = RAM[0x2080] | (RAM[0x2081] << 8);
85
86   if ((ace_index & 0x3FFF)==0)
87   {
88      cpu_set_reg(cpu, Z80_AF, RAM[0x2100] | (RAM[0x2101] << 8));
89      cpu_set_reg(cpu, Z80_BC, RAM[0x2104] | (RAM[0x2105] << 8));
90      cpu_set_reg(cpu, Z80_DE, RAM[0x2108] | (RAM[0x2109] << 8));
91      cpu_set_reg(cpu, Z80_HL, RAM[0x210c] | (RAM[0x210d] << 8));
92      cpu_set_reg(cpu, Z80_IX, RAM[0x2110] | (RAM[0x2111] << 8));
93      cpu_set_reg(cpu, Z80_IY, RAM[0x2114] | (RAM[0x2115] << 8));
94      cpu_set_reg(cpu, STATE_GENPC, RAM[0x211c] | (RAM[0x211d] << 8));
95      cpu_set_reg(cpu, Z80_AF2, RAM[0x2120] | (RAM[0x2121] << 8));
96      cpu_set_reg(cpu, Z80_BC2, RAM[0x2124] | (RAM[0x2125] << 8));
97      cpu_set_reg(cpu, Z80_DE2, RAM[0x2128] | (RAM[0x2129] << 8));
98      cpu_set_reg(cpu, Z80_HL2, RAM[0x212c] | (RAM[0x212d] << 8));
99      cpu_set_reg(cpu, Z80_IM, RAM[0x2130]);
100      cpu_set_reg(cpu, Z80_IFF1, RAM[0x2134]);
101      cpu_set_reg(cpu, Z80_IFF2, RAM[0x2138]);
102      cpu_set_reg(cpu, Z80_I, RAM[0x213c]);
103      cpu_set_reg(cpu, Z80_R, RAM[0x2140]);
104
105      if ((RAM[0x2119] < 0x80) || !ace_index)
106         cpu_set_reg(cpu, STATE_GENSP, RAM[0x2118] | (RAM[0x2119] << 8));
107   }
108
109   /* Copy data to the address space */
110   for (ace_index = 0x2000; ace_index < 0x8000; ace_index++)
111      space->write_byte(ace_index, RAM[ace_index]);
112
113   return IMAGE_INIT_PASS;
114}
src/mess/formats/ace_ace.h
r0r9952
1/*********************************************************************
2
3    ace_ace.h
4
5    Format code for Jupiter Ace snapshot files
6
7*********************************************************************/
8
9#pragma once
10
11#ifndef ACE_ACE_H
12#define ACE_ACE_H
13
14#include "imagedev/snapquik.h"
15
16SNAPSHOT_LOAD( ace );
17
18#endif /* ACE_ACE_H */
src/mess/mess.mak
r9951r9952
742742$(MESSOBJ)/cantab.a:         \
743743   $(MESS_DRIVERS)/ace.o      \
744744   $(MESS_MACHINE)/ace.o      \
745   $(MESS_FORMATS)/ace_ace.o   \
745746   $(MESS_FORMATS)/ace_tap.o   \
746747
747748$(MESSOBJ)/capcom.a:         \
src/mess/drivers/ace.c
r9951r9952
3333
3434   TODO:
3535
36   - printer
37   - Big Mouth speech unit (SP0256-AL1)
36   - Ace Colour Board
37   - 96K ram expansion
3838   - Deep Thought disc interface (6850, 6821)
3939
4040*/
r9951r9952
4343
4444#include "emu.h"
4545#include "cpu/z80/z80.h"
46#include "formats/ace_ace.h"
47#include "formats/ace_tap.h"
4648#include "imagedev/cassette.h"
4749#include "imagedev/snapquik.h"
50#include "machine/ctronics.h"
51#include "machine/i8255a.h"
52#include "machine/ram.h"
53#include "machine/z80pio.h"
4854#include "sound/ay8910.h"
55#include "sound/sp0256.h"
4956#include "sound/speaker.h"
5057#include "sound/wave.h"
51#include "formats/ace_tap.h"
5258#include "includes/ace.h"
5359
5460
r9951r9952
101107}
102108
103109
110//-------------------------------------------------
111//   ppi_r -
112//-------------------------------------------------
104113
114static READ8_DEVICE_HANDLER( ppi_pa_r )
115{
116   return i8255a_r(device, 0);
117}
118
119static READ8_DEVICE_HANDLER( ppi_pb_r )
120{
121   return i8255a_r(device, 1);
122}
123
124static READ8_DEVICE_HANDLER( ppi_pc_r )
125{
126   return i8255a_r(device, 2);
127}
128
129static READ8_DEVICE_HANDLER( ppi_control_r )
130{
131   return i8255a_r(device, 3);
132}
133
134
135//-------------------------------------------------
136//   ppi_w -
137//-------------------------------------------------
138
139static WRITE8_DEVICE_HANDLER( ppi_pa_w )
140{
141   i8255a_w(device, 0, data);
142}
143
144static WRITE8_DEVICE_HANDLER( ppi_pb_w )
145{
146   i8255a_w(device, 1, data);
147}
148
149static WRITE8_DEVICE_HANDLER( ppi_pc_w )
150{
151   i8255a_w(device, 2, data);
152}
153
154static WRITE8_DEVICE_HANDLER( ppi_control_w )
155{
156   i8255a_w(device, 3, data);
157}
158
159
160//-------------------------------------------------
161//   pio_r -
162//-------------------------------------------------
163
164static READ8_DEVICE_HANDLER( pio_ad_r )
165{
166   return z80pio_d_r(device, 0);
167}
168
169static READ8_DEVICE_HANDLER( pio_bd_r )
170{
171   return z80pio_d_r(device, 1);
172}
173
174static READ8_DEVICE_HANDLER( pio_ac_r )
175{
176   return z80pio_c_r(device, 0);
177}
178
179static READ8_DEVICE_HANDLER( pio_bc_r )
180{
181   return z80pio_c_r(device, 1);
182}
183
184
185//-------------------------------------------------
186//   pio_w -
187//-------------------------------------------------
188
189static WRITE8_DEVICE_HANDLER( pio_ad_w )
190{
191   z80pio_d_w(device, 0, data);
192}
193
194static WRITE8_DEVICE_HANDLER( pio_bd_w )
195{
196   z80pio_d_w(device, 1, data);
197}
198
199static WRITE8_DEVICE_HANDLER( pio_ac_w )
200{
201   z80pio_c_w(device, 0, data);
202}
203
204static WRITE8_DEVICE_HANDLER( pio_bc_w )
205{
206   z80pio_c_w(device, 1, data);
207}
208
209
210
105211//**************************************************************************
106212//   ADDRESS MAPS
107213//**************************************************************************
r9951r9952
112218
113219static ADDRESS_MAP_START( ace_mem, ADDRESS_SPACE_PROGRAM, 8, ace_state )
114220   AM_RANGE(0x0000, 0x1fff) AM_ROM
115   AM_RANGE(0x2400, 0x27ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_video_ram)
116   AM_RANGE(0x2c00, 0x2fff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_char_ram) AM_REGION(Z80_TAG, 0xfc00)
117   AM_RANGE(0x3c00, 0x3fff) AM_MIRROR(0x0c00) AM_RAM
221   AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_video_ram)
222   AM_RANGE(0x2800, 0x2bff) AM_MIRROR(0x0400) AM_RAM AM_BASE(m_char_ram) AM_REGION(Z80_TAG, 0xfc00)
223   AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM
118224   AM_RANGE(0x4000, 0xffff) AM_RAM
119225ADDRESS_MAP_END
120226
r9951r9952
126232static ADDRESS_MAP_START( ace_io, ADDRESS_SPACE_IO, 8, ace_state )
127233   AM_RANGE(0x00, 0x00) AM_MIRROR(0xfffe) AM_MASK(0xff00) AM_READWRITE(io_r, io_w)
128234   AM_RANGE(0x01, 0x01) AM_MIRROR(0xff00) AM_READ_PORT("JOY")
235   AM_RANGE(0x41, 0x41) AM_MIRROR(0xff80) AM_DEVREADWRITE_LEGACY(I8255_TAG, ppi_pa_r, ppi_pa_w)
236   AM_RANGE(0x43, 0x43) AM_MIRROR(0xff80) AM_DEVREADWRITE_LEGACY(I8255_TAG, ppi_pb_r, ppi_pb_w)
237   AM_RANGE(0x45, 0x45) AM_MIRROR(0xff80) AM_DEVREADWRITE_LEGACY(I8255_TAG, ppi_pc_r, ppi_pc_w)
238   AM_RANGE(0x47, 0x47) AM_MIRROR(0xff80) AM_DEVREADWRITE_LEGACY(I8255_TAG, ppi_control_r, ppi_control_w)
239   AM_RANGE(0x81, 0x81) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ad_r, pio_ad_w)
240   AM_RANGE(0x83, 0x83) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bd_r, pio_bd_w)
241   AM_RANGE(0x85, 0x85) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_ac_r, pio_ac_w)
242   AM_RANGE(0x87, 0x87) AM_MIRROR(0xff38) AM_DEVREADWRITE_LEGACY(Z80PIO_TAG, pio_bc_r, pio_bc_w)
129243   AM_RANGE(0xfd, 0xfd) AM_MIRROR(0xff00) AM_DEVWRITE_LEGACY(AY8910_TAG, ay8910_address_w)
130244   AM_RANGE(0xff, 0xff) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY(AY8910_TAG, ay8910_r, ay8910_data_w)
131245ADDRESS_MAP_END
r9951r9952
137251//**************************************************************************
138252
139253//-------------------------------------------------
140//  INPUT_PORTS( bullet )
254//  INPUT_PORTS( ace )
141255//-------------------------------------------------
142256
143static INPUT_PORTS_START (ace)
257static INPUT_PORTS_START( ace )
144258   PORT_START("A8")
145259   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)      PORT_CHAR(UCHAR_SHIFT_1)
146260   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Symbol Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_2)
r9951r9952
228342
229343static const gfx_layout ace_charlayout =
230344{
231   8, 8,   /* 8x8 characters */
232   128,   /* 128 characters */
233   1,      /* 1 bits per pixel */
234   {0},   /* no bitplanes; 1 bit per pixel */
235   {0, 1, 2, 3, 4, 5, 6, 7},
236   {0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8},
237   8*8    /* each character takes 8 consecutive bytes */
345   8,8,
346   128,
347   1,
348   { RGN_FRAC(0,1) },
349   { STEP8(0,1) },
350   { STEP8(0,8) },
351   8*8
238352};
239353
240354
r9951r9952
274388bool ace_state::video_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
275389{
276390   UINT8 y,ra,chr,gfx;
277   UINT16 sy=0,ma=0,x;
391   UINT16 sy=56,ma=0,x;
278392
279393   for (y = 0; y < 24; y++)
280394   {
281395      for (ra = 0; ra < 8; ra++)
282396      {
283         UINT16 *p = BITMAP_ADDR16(&bitmap, sy++, 0);
397         UINT16 *p = BITMAP_ADDR16(&bitmap, sy++, 40);
284398
285399         for (x = ma; x < ma+32; x++)
286400         {
r9951r9952
335449   DEVCB_NULL,
336450   DEVCB_NULL,
337451   DEVCB_NULL,
452   DEVCB_NULL
453};
454
455
456//-------------------------------------------------
457//  sp0256_interface sp0256_intf
458//-------------------------------------------------
459
460static const sp0256_interface sp0256_intf =
461{
338462   DEVCB_NULL,
463   DEVCB_NULL
339464};
340465
341466
467//-------------------------------------------------
468//  I8255A_INTERFACE( ppi_intf )
469//-------------------------------------------------
342470
471static READ8_DEVICE_HANDLER( sby_r )
472{
473   /*
474
475      bit      description
476
477      PC0      SP0256 SBY
478      PC1     
479      PC2     
480      PC3     
481      PC4     
482      PC5     
483      PC6     
484      PC7     
485
486   */
487
488   return sp0256_sby_r(device);
489}
490
491static WRITE8_DEVICE_HANDLER( ald_w )
492{
493   /*
494
495      bit      description
496
497      PA0      SP0256 A1
498      PA1      SP0256 A2
499      PA2      SP0256 A3
500      PA3      SP0256 A4
501      PA4      SP0256 A5
502      PA5      SP0256 A6
503      PA6      SP0256 _ALD
504      PA7     
505
506   */
507
508   if (!BIT(data, 6))
509   {
510      sp0256_ALD_w(device, 0, data & 0x3f);
511   }
512}
513
514static I8255A_INTERFACE( ppi_intf )
515{
516   DEVCB_NULL,
517   DEVCB_NULL,
518   DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, sby_r),
519   DEVCB_DEVICE_HANDLER(SP0256AL2_TAG, ald_w),
520   DEVCB_NULL,
521   DEVCB_NULL
522};
523
524
525//-------------------------------------------------
526//  Z80PIO_INTERFACE( pio_intf )
527//-------------------------------------------------
528
529READ8_MEMBER( ace_state::pio_pa_r )
530{
531   /*
532
533        bit     description
534
535        PA0     
536        PA1      RxD
537        PA2     
538        PA3     
539        PA4     
540        PA5     
541        PA6     
542        PA7   
543
544    */
545
546   return 0;
547};
548
549WRITE8_MEMBER( ace_state::pio_pa_w )
550{
551   /*
552
553        bit     description
554
555        PA0      RTS
556        PA1     
557        PA2      CTS
558        PA3      TxD
559        PA4     
560        PA5     
561        PA6      STB
562        PA7   
563
564    */
565
566   // centronics strobe
567   centronics_strobe_w(m_centronics, !BIT(data, 6));
568};
569
570static Z80PIO_INTERFACE( pio_intf )
571{
572   DEVCB_CPU_INPUT_LINE(Z80_TAG, INPUT_LINE_IRQ0),
573   DEVCB_DRIVER_MEMBER(ace_state, pio_pa_r),
574   DEVCB_DRIVER_MEMBER(ace_state, pio_pa_w),
575   DEVCB_NULL,
576   DEVCB_NULL,
577   DEVCB_DEVICE_HANDLER(CENTRONICS_TAG, centronics_data_w),
578   DEVCB_NULL
579};
580
581
582
343583//**************************************************************************
344584//   MACHINE INITIALIZATION
345585//**************************************************************************
r9951r9952
362602   case 16*1024:
363603      memory_unmap_readwrite(program, 0x8000, 0xffff, 0, 0);
364604      break;
605
606   case 32*1024:
607      memory_unmap_readwrite(program, 0xc000, 0xffff, 0, 0);
608      break;
365609   }
366610}
367611
r9951r9952
376620//-------------------------------------------------
377621
378622static MACHINE_CONFIG_START( ace, ace_state )
379   /* basic machine hardware */
623   // basic machine hardware
380624   MCFG_CPU_ADD(Z80_TAG, Z80, XTAL_6_5MHz/2)
381625   MCFG_CPU_PROGRAM_MAP(ace_mem)
382626   MCFG_CPU_IO_MAP(ace_io)
383627   MCFG_QUANTUM_TIME(HZ(60))
384628
385   /* video hardware */
629   // video hardware
386630   MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
387631   MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
388   MCFG_SCREEN_RAW_PARAMS(XTAL_6_5MHz, 416, 0, 256, 264, 0, 192)
632   MCFG_SCREEN_RAW_PARAMS(XTAL_6_5MHz, 416, 0, 336, 312, 0, 304)
389633   MCFG_TIMER_ADD_SCANLINE("set_irq", set_irq, SCREEN_TAG, 31*8, 264)
390634   MCFG_TIMER_ADD_SCANLINE("clear_irq", clear_irq, SCREEN_TAG, 32*8, 264)
391635
392   MCFG_GFXDECODE( ace )
393636   MCFG_PALETTE_LENGTH(2)
394637   MCFG_PALETTE_INIT(black_and_white)
395638
396   /* sound hardware */
639   MCFG_GFXDECODE(ace)
640
641   // sound hardware
397642   MCFG_SPEAKER_STANDARD_MONO("mono")
398643   MCFG_SOUND_WAVE_ADD("wave", CASSETTE_TAG)
399644   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
r9951r9952
404649   MCFG_SOUND_CONFIG(psg_intf)
405650   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
406651
407   /* Devices */
652   MCFG_SOUND_ADD(SP0256AL2_TAG, SP0256, XTAL_3MHz)
653   MCFG_SOUND_CONFIG(sp0256_intf)
654   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
655
656   // devices
408657   MCFG_CASSETTE_ADD(CASSETTE_TAG, ace_cassette_config)
409658   MCFG_SNAPSHOT_ADD("snapshot", ace, "ace", 1)
659   MCFG_I8255A_ADD(I8255_TAG, ppi_intf)
660   MCFG_Z80PIO_ADD(Z80PIO_TAG, XTAL_6_5MHz/2, pio_intf)
661   MCFG_CENTRONICS_ADD(CENTRONICS_TAG, standard_centronics)
410662
411   /* internal ram */
663   // internal ram
412664   MCFG_RAM_ADD(RAM_TAG)
413665   MCFG_RAM_DEFAULT_SIZE("1K")
414   MCFG_RAM_EXTRA_OPTIONS("16K,48K")
666   MCFG_RAM_EXTRA_OPTIONS("16K,32K,48K")
415667MACHINE_CONFIG_END
416668
417669
r9951r9952
425677//-------------------------------------------------
426678
427679ROM_START( ace )
428   ROM_REGION( 0x10000, Z80_TAG,0 )
680   ROM_REGION( 0x10000, Z80_TAG, 0 )
429681   ROM_LOAD( "rom-a.z1", 0x0000, 0x1000, CRC(dc8438a5) SHA1(8fa97eb71e5dd17c7d190c6587ee3840f839347c) )
430682   ROM_LOAD( "rom-b.z2", 0x1000, 0x1000, CRC(4009f636) SHA1(98c5d4bcd74bcf014268cf4c00b2007ea5cc21f3) )
431683
432684   ROM_REGION( 0x1000, "fdc", 0 ) // Deep Thought disc interface
433685   ROM_LOAD( "dos 4.bin", 0x0000, 0x1000, CRC(04c70448) SHA1(53ddcced6ae2feafd687a3b55864726656b71412) )
686
687   ROM_REGION( 0x10000, SP0256AL2_TAG, 0 )
688   ROM_LOAD( "sp0256-al2.ic1", 0x000, 0x800, CRC(df8de0b0) SHA1(86fb6d9fef955ac0bc76e0c45c66585946d278a1) )
434689ROM_END
435690
436691
docs/messnew.txt
r9951r9952
6363- [ABC1600] Added ROM dumps. [Ola Andersson]
6464
6565- [ACE] Renamed jupiter to ace to avoid naming conflict with Wave Mate.
66  Added support for BoldField Joystick interface AC5 and EME Soundbox AC4.
67  Cleaned up and modernized driver. [Curt Coder]
66  Cleaned up and modernized driver. Implemented the following expansions:
67  BoldField Joystick interface AC5, EME Soundbox AC4, EME Printer Board,
68  Big Mouth speech board. [Curt Coder]
6869
6970- [AMU880] Fixed keyboard. [Curt Coder]
7071

Previous 15994 Revisions Next


© 1998-2018 The MESS Team