Previous 15994 Revisions Next

r3140 Monday 1st September, 2008 at 18:42:04 UTC by Dirk Best
[AIM65] Some small cleanups
[src/mess/drivers]aim65.c
[src/mess/includes]aim65.h
[src/mess/machine]aim65.c

src/mess/includes/aim65.h
r3139r3140
99#ifndef AIM65_H_
1010#define AIM65_H_
1111
12#include "machine/6532riot.h"
1312
1413/** R6502 Clock.
1514 *
1615 * The R6502 on AIM65 operates at 1 MHz. The frequency reference is a 4 Mhz
17 * crystal controlled oscillator. Dual D-type flip-flop Z10 devides the 4 MHz
16 * crystal controlled oscillator. Dual D-type flip-flop Z10 divides the 4 MHz
1817 * signal by four to drive the R6502 phase 0 (O0) input with a 1 MHz clock.
1918 */
2019#define AIM65_CLOCK  XTAL_4MHz/4
r3139r3140
2827void aim65_update_ds4(int digit, int data);
2928void aim65_update_ds5(int digit, int data);
3029
30UINT8 aim65_riot_b_r(const device_config *device, UINT8 olddata);
31void aim65_riot_a_w(const device_config *device, UINT8 data, UINT8 olddata);
32void aim65_riot_irq(const device_config *device, int state);
33
3134DRIVER_INIT( aim65 );
3235
33extern const riot6532_interface aim65_r6532_interface;
3436
3537/*----------- defined in video/aim65.c -----------*/
3638
src/mess/machine/aim65.c
r3139r3140
1111/* Peripheral chips */
1212#include "machine/6821pia.h"
1313#include "machine/6522via.h"
14#include "machine/6532riot.h"
1514
1615/* DL1416A display chip */
1716#include "video/dl1416.h"
r3139r3140
132131******************************************************************************/
133132
134133
135static UINT8 aim65_riot_b_r(const device_config *device, UINT8 olddata)
134UINT8 aim65_riot_b_r(const device_config *device, UINT8 olddata)
136135{
137   static const char *keynames[] = { "keyboard_0", "keyboard_1", "keyboard_2", "keyboard_3",
138                              "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7" };
136   static const char *keynames[] =
137   {
138      "keyboard_0", "keyboard_1", "keyboard_2", "keyboard_3",
139      "keyboard_4", "keyboard_5", "keyboard_6", "keyboard_7"
140   };
141
139142   int row, data = 0xff;
140143
141144   /* scan keyboard rows */
142   for (row = 0; row < 8; row++)
145   for (row = 0; row < 8; row++)
143146   {
144147      if (!(riot_port_a & (1 << row)))
145148         data &= input_port_read(device->machine, keynames[row]);
r3139r3140
149152}
150153
151154
152static void aim65_riot_a_w(const device_config *device, UINT8 data, UINT8 olddata)
155void aim65_riot_a_w(const device_config *device, UINT8 data, UINT8 olddata)
153156{
154157   riot_port_a = data;
155158}
156159
157160
158static void aim65_riot_irq(const device_config *device, int state)
161void aim65_riot_irq(const device_config *device, int state)
159162{
160163   cpunum_set_input_line(device->machine, 0, M6502_IRQ_LINE, state ? HOLD_LINE : CLEAR_LINE);
161164}
162165
163166
164const riot6532_interface aim65_r6532_interface =
165{
166   NULL,
167   aim65_riot_b_r,
168   aim65_riot_a_w,
169   NULL,
170   aim65_riot_irq
171};
172167
173
174
175168/******************************************************************************
176169 6522 VIA
177170******************************************************************************/
src/mess/drivers/aim65.c
r3139r3140
3636
3737
3838/* Note: RAM is mapped dynamically in machine/aim65.c */
39static ADDRESS_MAP_START( aim65_mem , ADDRESS_SPACE_PROGRAM, 8 )
39static ADDRESS_MAP_START( aim65_mem, ADDRESS_SPACE_PROGRAM, 8 )
4040   AM_RANGE( 0x1000, 0x9fff ) AM_NOP /* User available expansions */
41   AM_RANGE( 0xa000, 0xa00f ) AM_MIRROR(0x3f0) AM_READWRITE( via_1_r, via_1_w ) /* User VIA */
41   AM_RANGE( 0xa000, 0xa00f ) AM_MIRROR(0x3f0) AM_READWRITE(via_1_r, via_1_w) /* User VIA */
4242   AM_RANGE( 0xa400, 0xa47f ) AM_RAM /* RIOT RAM */
4343   AM_RANGE( 0xa480, 0xa497 ) AM_DEVREADWRITE(RIOT6532, "riot", riot6532_r, riot6532_w)
4444   AM_RANGE( 0xa498, 0xa7ff ) AM_NOP /* Not available */
45   AM_RANGE( 0xa800, 0xa80f ) AM_MIRROR(0x3f0) AM_READWRITE( via_0_r, via_0_w )
46   AM_RANGE( 0xac00, 0xac03 ) AM_READWRITE( pia_0_r, pia_0_w )
45   AM_RANGE( 0xa800, 0xa80f ) AM_MIRROR(0x3f0) AM_READWRITE(via_0_r, via_0_w)
46   AM_RANGE( 0xac00, 0xac03 ) AM_READWRITE(pia_0_r, pia_0_w)
4747   AM_RANGE( 0xac04, 0xac43 ) AM_RAM /* PIA RAM */
4848   AM_RANGE( 0xac44, 0xafff ) AM_NOP /* Not available */
4949   AM_RANGE( 0xb000, 0xffff ) AM_ROM /* 5 ROM sockets */
r3139r3140
157157static const dl1416_interface dl1416_ds4 = { DL1416T, aim65_update_ds4 };
158158static const dl1416_interface dl1416_ds5 = { DL1416T, aim65_update_ds5 };
159159
160/* riot interface */
161static const riot6532_interface aim65_r6532_interface =
162{
163   NULL,
164   aim65_riot_b_r,
165   aim65_riot_a_w,
166   NULL,
167   aim65_riot_irq
168};
160169
161170
171
162172/******************************************************************************
163173 Machine Drivers
164174******************************************************************************/
r3139r3140
171181
172182   MDRV_DEFAULT_LAYOUT(layout_aim65)
173183
184   /* alpha-numeric display */
174185   MDRV_DEVICE_ADD("ds1", DL1416)
175186   MDRV_DEVICE_CONFIG(dl1416_ds1)
176187   MDRV_DEVICE_ADD("ds2", DL1416)
r3139r3140
184195
185196   MDRV_VIDEO_START(aim65)
186197
187   /* devices */
198   /* other devices */
188199   MDRV_RIOT6532_ADD("riot", AIM65_CLOCK, aim65_r6532_interface)
189200MACHINE_DRIVER_END
190201
r3139r3140
211222
212223/* Currently dumped and available software:
213224 *
214 * Name        Loc  CRC32     SHA1
215 * -------------------------------------------------------------------
216 * Assembler   Z24  0878b399  483e92b57d64be51643a9f6490521a8572aa2f68
217 * Basic V1.1  Z25  d7b42d2a  4bbdb28d332429825adea0266ed9192786d9e392
218 * Basic V1.1  Z26  36a61f39  f5ce0126cb594a565e730973fd140d03c298cefa
219 * Forth V1.3  Z25  0671d019  dd2a1613e435c833634100cf4a22c6cff70c7a26
220 * Forth V1.3  Z26  a80ad472  42a2e8c86829a2fe48090e6665ff9fe25b12b070
221 * Mathpack    Z24  4889af55  5e9541ddfc06e3802d09b30d1bd89c5da914c76e
222 * Monitor     Z22  d01914b0  e5b5ddd4cd43cce073a718ee4ba5221f2bc84eaf
223 * Monitor     Z23  90e44afe  78e38601edf6bfc787b58750555a636b0cf74c5c
224 * PL/65 V1.0  Z25  76dcf864  e937c54ed109401f796640cd45b27dfefb76667e
225 * PL/65 V1.0  Z26  2ac71abd  6df5e3125bebefac80d51d9337555f54bdf0d8ea
225 * Name             Loc  CRC32     SHA1
226 * ------------------------------------------------------------------------
227 * Assembler        Z24  0878b399  483e92b57d64be51643a9f6490521a8572aa2f68
228 * Basic V1.1       Z25  d7b42d2a  4bbdb28d332429825adea0266ed9192786d9e392
229 * Basic V1.1       Z26  36a61f39  f5ce0126cb594a565e730973fd140d03c298cefa
230 * Forth V1.3       Z25  0671d019  dd2a1613e435c833634100cf4a22c6cff70c7a26
231 * Forth V1.3       Z26  a80ad472  42a2e8c86829a2fe48090e6665ff9fe25b12b070
232 * Mathpack         Z24  4889af55  5e9541ddfc06e3802d09b30d1bd89c5da914c76e
233 * Monitor          Z22  d01914b0  e5b5ddd4cd43cce073a718ee4ba5221f2bc84eaf
234 * Monitor          Z23  90e44afe  78e38601edf6bfc787b58750555a636b0cf74c5c
235 * Monitor Dynatem  Z22  83e1c6e7  444134043edd83385bd70434cb100269901c4417
236 * PL/65 V1.0       Z25  76dcf864  e937c54ed109401f796640cd45b27dfefb76667e
237 * PL/65 V1.0       Z26  2ac71abd  6df5e3125bebefac80d51d9337555f54bdf0d8ea
226238 *
227239 */
228240

Previous 15994 Revisions Next


© 1998-2018 The MESS Team