Previous 199869 Revisions Next

r22525 Wednesday 24th April, 2013 at 13:33:52 UTC by Miodrag Milanović
removed usage of 6532RIOT legacy calls (nw)
[src/emu/machine]6532riot.c 6532riot.h
[src/mame/audio]exidy.c starwars.c
[src/mame/drivers]firefox.c gameplan.c spectra.c starwars.c tomcat.c tourtabl.c
[src/mame/includes]gameplan.h starwars.h
[src/mess/drivers]a7800.c aim65.c beta.c junior.c sym1.c
[src/mess/machine]c2040.c c8280.c d9060.c interpod.c

trunk/src/mame/includes/gameplan.h
r22524r22525
77***************************************************************************/
88
99#include "machine/6522via.h"
10#include "machine/6532riot.h"
1011
1112#define GAMEPLAN_MAIN_MASTER_CLOCK       (XTAL_3_579545MHz)
1213#define GAMEPLAN_AUDIO_MASTER_CLOCK      (XTAL_3_579545MHz)
r22524r22525
2930         m_trvquest_question(*this, "trvquest_q"),
3031         m_maincpu(*this, "maincpu"),
3132         m_audiocpu(*this, "audiocpu"),
33         m_riot(*this, "riot"),
3234         m_via_0(*this, "via6522_0"),
3335         m_via_1(*this, "via6522_1"),
3436         m_via_2(*this, "via6522_2") { }
r22524r22525
4951   /* devices */
5052   required_device<cpu_device> m_maincpu;
5153   optional_device<cpu_device> m_audiocpu;
52   device_t *m_riot;
54   optional_device<riot6532_device> m_riot;
5355   required_device<via6522_device> m_via_0;
5456   required_device<via6522_device> m_via_1;
5557   required_device<via6522_device> m_via_2;
trunk/src/mame/includes/starwars.h
r22524r22525
1212public:
1313   starwars_state(const machine_config &mconfig, device_type type, const char *tag)
1414      : driver_device(mconfig, type, tag),
15      m_riot(*this, "riot"),
1516      m_mathram(*this, "mathram"),
1617      m_maincpu(*this, "maincpu"),
1718      m_audiocpu(*this, "audiocpu")  { }
1819
1920   UINT8 m_sound_data;
2021   UINT8 m_main_data;
21   device_t *m_riot;
22   required_device<riot6532_device> m_riot;
2223   UINT8 *m_slapstic_source;
2324   UINT8 *m_slapstic_base;
2425   UINT8 m_slapstic_current_bank;
r22524r22525
8586/*----------- defined in audio/starwars.c -----------*/
8687
8788extern const riot6532_interface starwars_riot6532_intf;
88SOUND_START( starwars );
trunk/src/mame/drivers/tomcat.c
r22524r22525
338338   AM_RANGE(0x3000, 0x30df) AM_WRITE(soundlatches_w)
339339   AM_RANGE(0x30e0, 0x30e0) AM_NOP // COINRD Inputs: D7 = Coin L, D6 = Coin R, D5 = SOUNDFLAG
340340   AM_RANGE(0x5000, 0x507f) AM_RAM // 6532 ram
341   AM_RANGE(0x5080, 0x509f) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
341   AM_RANGE(0x5080, 0x509f) AM_DEVREADWRITE("riot", riot6532_device, read, write)
342342   AM_RANGE(0x6000, 0x601f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
343343   AM_RANGE(0x7000, 0x701f) AM_DEVREADWRITE("pokey2", pokey_device, read, write)
344344   AM_RANGE(0x8000, 0xffff) AM_NOP // main sound program rom
trunk/src/mame/drivers/firefox.c
r22524r22525
557557static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, firefox_state )
558558   AM_RANGE(0x0000, 0x07ff) AM_RAM
559559   AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0700) AM_RAM /* RIOT ram */
560   AM_RANGE(0x0880, 0x089f) AM_MIRROR(0x07e0) AM_DEVREADWRITE_LEGACY("riot",riot6532_r, riot6532_w)
560   AM_RANGE(0x0880, 0x089f) AM_MIRROR(0x07e0) AM_DEVREADWRITE("riot", riot6532_device, read, write)
561561   AM_RANGE(0x1000, 0x1000) AM_READ(main_to_sound_r)
562562   AM_RANGE(0x1800, 0x1800) AM_WRITE(sound_to_main_w)
563563   AM_RANGE(0x2000, 0x200f) AM_DEVREADWRITE("pokey1", pokey_device, read, write)
trunk/src/mame/drivers/gameplan.c
r22524r22525
148148
149149WRITE8_MEMBER(gameplan_state::audio_cmd_w)
150150{
151   riot6532_porta_in_set(m_riot, data, 0x7f);
151   m_riot->porta_in_set(data, 0x7f);
152152}
153153
154154
155155WRITE8_MEMBER(gameplan_state::audio_trigger_w)
156156{
157   riot6532_porta_in_set(m_riot, data << 7, 0x80);
157   m_riot->porta_in_set(data << 7, 0x80);
158158}
159159
160160
r22524r22525
224224
225225static ADDRESS_MAP_START( gameplan_audio_map, AS_PROGRAM, 8, gameplan_state )
226226   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x1780) AM_RAM  /* 6532 internal RAM */
227   AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
227   AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE("riot", riot6532_device, read, write)
228228   AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w)
229229   AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
230230   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w)
r22524r22525
235235/* same as Gameplan, but larger ROM */
236236static ADDRESS_MAP_START( leprechn_audio_map, AS_PROGRAM, 8, gameplan_state )
237237   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x1780) AM_RAM  /* 6532 internal RAM */
238   AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
238   AM_RANGE(0x0800, 0x081f) AM_MIRROR(0x17e0) AM_DEVREADWRITE("riot", riot6532_device, read, write)
239239   AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w)
240240   AM_RANGE(0xa001, 0xa001) AM_MIRROR(0x1ffc) AM_DEVREAD_LEGACY("aysnd", ay8910_r)
241241   AM_RANGE(0xa002, 0xa002) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w)
r22524r22525
973973
974974MACHINE_START_MEMBER(gameplan_state,gameplan)
975975{
976   m_riot = machine().device("riot");
977
978976   /* register for save states */
979977   save_item(NAME(m_current_port));
980978   save_item(NAME(m_video_x));
trunk/src/mame/drivers/spectra.c
r22524r22525
6161   ADDRESS_MAP_GLOBAL_MASK(0xfff)
6262   AM_RANGE(0x0000, 0x00ff) AM_RAM AM_SHARE("ram") // battery backed, 2x 5101L
6363   AM_RANGE(0x0100, 0x017f) AM_RAM // RIOT RAM
64   AM_RANGE(0x0180, 0x019f) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
64   AM_RANGE(0x0180, 0x019f) AM_DEVREADWRITE("riot", riot6532_device, read, write)
6565   AM_RANGE(0x0400, 0x0fff) AM_ROM
6666ADDRESS_MAP_END
6767
trunk/src/mame/drivers/tourtabl.c
r22524r22525
5858static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tourtabl_state )
5959   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_DEVREADWRITE("tia_video", tia_video_device, read, write)
6060   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM
61   AM_RANGE(0x0280, 0x029f) AM_DEVREADWRITE_LEGACY("riot1", riot6532_r, riot6532_w)
61   AM_RANGE(0x0280, 0x029f) AM_DEVREADWRITE("riot1", riot6532_device, read, write)
6262   AM_RANGE(0x0400, 0x047f) AM_RAM
63   AM_RANGE(0x0500, 0x051f) AM_DEVREADWRITE_LEGACY("riot2", riot6532_r, riot6532_w)
63   AM_RANGE(0x0500, 0x051f) AM_DEVREADWRITE("riot2", riot6532_device, read, write)
6464   AM_RANGE(0x0800, 0x1fff) AM_ROM
6565   AM_RANGE(0xe800, 0xffff) AM_ROM
6666ADDRESS_MAP_END
trunk/src/mame/drivers/starwars.c
r22524r22525
200200   AM_RANGE(0x0000, 0x07ff) AM_WRITE(starwars_sout_w)
201201   AM_RANGE(0x0800, 0x0fff) AM_READ(starwars_sin_r)        /* SIN Read */
202202   AM_RANGE(0x1000, 0x107f) AM_RAM                         /* 6532 ram */
203   AM_RANGE(0x1080, 0x109f) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
203   AM_RANGE(0x1080, 0x109f) AM_DEVREADWRITE("riot", riot6532_device, read, write)
204204   AM_RANGE(0x1800, 0x183f) AM_WRITE(quad_pokeyn_w)
205205   AM_RANGE(0x2000, 0x27ff) AM_RAM                         /* program RAM */
206206   AM_RANGE(0x4000, 0x7fff) AM_ROM                         /* sound roms */
r22524r22525
348348   MCFG_VIDEO_START(avg_starwars)
349349
350350   /* sound hardware */
351   MCFG_SOUND_START(starwars)
352351   MCFG_SPEAKER_STANDARD_MONO("mono")
353352
354353   MCFG_POKEY_ADD("pokey1", MASTER_CLOCK / 8)
trunk/src/mame/audio/starwars.c
r22524r22525
1313#include "includes/starwars.h"
1414
1515
16
17
18
19SOUND_START( starwars )
20{
21   starwars_state *state = machine.driver_data<starwars_state>();
22   state->m_riot = machine.device("riot");
23}
24
25
2616/*************************************
2717 *
2818 *  RIOT interfaces
r22524r22525
4232   /* d1 (out) TMS5220 Not Read        */
4333   /* d0 (out) TMS5220 Not Write       */
4434   /* Note: bit 4 is always set to avoid sound self test */
45   UINT8 olddata = riot6532_porta_in_get(machine().device("riot"));
35   UINT8 olddata = m_riot->porta_in_get();
4636
4737   return (olddata & 0xc0) | 0x10 | (tms5220_readyq_r(machine().device("tms")) << 2);
4838}
r22524r22525
8575static TIMER_CALLBACK( sound_callback )
8676{
8777   starwars_state *state = machine.driver_data<starwars_state>();
88   riot6532_porta_in_set(state->m_riot, 0x40, 0x40);
78   state->m_riot->porta_in_set(0x40, 0x40);
8979   state->m_main_data = param;
9080   machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
9181}
r22524r22525
9383
9484READ8_MEMBER(starwars_state::starwars_sin_r)
9585{
96   riot6532_porta_in_set(m_riot, 0x00, 0x80);
86   m_riot->porta_in_set(0x00, 0x80);
9787   return m_sound_data;
9888}
9989
r22524r22525
113103
114104READ8_MEMBER(starwars_state::starwars_main_read_r)
115105{
116   riot6532_porta_in_set(m_riot, 0x00, 0x40);
106   m_riot->porta_in_set(0x00, 0x40);
117107   return m_main_data;
118108}
119109
120110
121111READ8_MEMBER(starwars_state::starwars_main_ready_flag_r)
122112{
123   return riot6532_porta_in_get(m_riot) & 0xc0;    /* only upper two flag bits mapped */
113   return m_riot->porta_in_get() & 0xc0;    /* only upper two flag bits mapped */
124114}
125115
126116static TIMER_CALLBACK( main_callback )
127117{
128118   starwars_state *state = machine.driver_data<starwars_state>();
129   if (riot6532_porta_in_get(state->m_riot) & 0x80)
119   if (state->m_riot->porta_in_get() & 0x80)
130120      logerror("Sound data not read %x\n",state->m_sound_data);
131121
132   riot6532_porta_in_set(state->m_riot, 0x80, 0x80);
122   state->m_riot->porta_in_set(0x80, 0x80);
133123   state->m_sound_data = param;
134124   machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
135125}
r22524r22525
142132
143133WRITE8_MEMBER(starwars_state::starwars_soundrst_w)
144134{
145   riot6532_porta_in_set(m_riot, 0x00, 0xc0);
135   m_riot->porta_in_set(0x00, 0xc0);
146136
147137   /* reset sound CPU here  */
148138   m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
trunk/src/mame/audio/exidy.c
r22524r22525
8181   UINT8 m_riot_irq_state;
8282
8383   /* 6532 variables */
84   device_t *m_riot;
84   riot6532_device *m_riot;
8585
8686   struct sh6840_timer_channel m_sh6840_timer[3];
8787   INT16 m_sh6840_volume[3];
r22524r22525
532532
533533   if (state->m_tms != NULL)
534534   {
535      logerror("(%f)%s:TMS5220 data write = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), riot6532_porta_out_get(state->m_riot));
535      logerror("(%f)%s:TMS5220 data write = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), state->m_riot->porta_out_get());
536536      tms5220_data_w(state->m_tms, space, 0, data);
537537   }
538538}
r22524r22525
563563static READ8_DEVICE_HANDLER( r6532_portb_r )
564564{
565565   exidy_sound_state *state = get_safe_token(device);
566   UINT8 newdata = riot6532_portb_in_get(state->m_riot);
566   UINT8 newdata = state->m_riot->portb_in_get();
567567   if (state->m_tms != NULL)
568568   {
569569      newdata &= ~0x0c;
r22524r22525
843843
844844   DEVICE_START_CALL(common_sh_start);
845845
846   state->m_riot = machine.device("riot");
846   state->m_riot = machine.device<riot6532_device>("riot");
847847
848848   state->m_has_sh8253  = TRUE;
849849   state->m_tms = NULL;
r22524r22525
935935static ADDRESS_MAP_START( venture_audio_map, AS_PROGRAM, 8, driver_device )
936936   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
937937   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0780) AM_RAM
938   AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
938   AM_RANGE(0x0800, 0x087f) AM_MIRROR(0x0780) AM_DEVREADWRITE("riot", riot6532_device, read, write)
939939   AM_RANGE(0x1000, 0x1003) AM_MIRROR(0x07fc) AM_DEVREADWRITE("pia1", pia6821_device, read, write)
940940   AM_RANGE(0x1800, 0x1803) AM_MIRROR(0x07fc) AM_DEVREADWRITE_LEGACY("custom", exidy_sh8253_r, exidy_sh8253_w)
941941   AM_RANGE(0x2000, 0x27ff) AM_DEVWRITE_LEGACY("custom", exidy_sound_filter_w)
r22524r22525
977977      hc55516_digit_w(state->m_cvsd, data & 1);
978978
979979   if (!(offset & 0x20))
980      riot6532_portb_in_set(state->m_riot, data & 1, 0xff);
980      state->m_riot->portb_in_set(data & 1, 0xff);
981981}
982982
983983
r22524r22525
987987
988988   if (!(offset & 0x80))
989989   {
990      UINT8 porta = riot6532_porta_out_get(state->m_riot);
990      UINT8 porta = state->m_riot->porta_out_get();
991991      UINT8 data = (porta & 0x06) >> 1;
992992      data |= (porta & 0x01) << 2;
993993      data |= (porta & 0x08);
r22524r22525
12011201
12021202static ADDRESS_MAP_START( victory_audio_map, AS_PROGRAM, 8, driver_device )
12031203   AM_RANGE(0x0000, 0x00ff) AM_MIRROR(0x0f00) AM_RAM
1204   AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
1204   AM_RANGE(0x1000, 0x107f) AM_MIRROR(0x0f80) AM_DEVREADWRITE("riot", riot6532_device, read, write)
12051205   AM_RANGE(0x2000, 0x2003) AM_MIRROR(0x0ffc) AM_DEVREADWRITE("pia1", pia6821_device, read, write)
12061206   AM_RANGE(0x3000, 0x3003) AM_MIRROR(0x0ffc) AM_DEVREADWRITE_LEGACY("custom", exidy_sh8253_r, exidy_sh8253_w)
12071207   AM_RANGE(0x4000, 0x4fff) AM_NOP
trunk/src/emu/machine/6532riot.c
r22524r22525
156156    riot6532_w - master I/O write access
157157-------------------------------------------------*/
158158
159WRITE8_DEVICE_HANDLER( riot6532_w )
160{
161   riot6532_device *via = downcast<riot6532_device *>(device);
162   via->reg_w(offset, data);
163}
164
165159WRITE8_MEMBER( riot6532_device::write )
166160{
167161   reg_w(offset, data);
r22524r22525
247241    riot6532_r - master I/O read access
248242-------------------------------------------------*/
249243
250READ8_DEVICE_HANDLER( riot6532_r )
251{
252   riot6532_device *via = downcast<riot6532_device *>(device);
253   return via->reg_r(offset);
254}
255
256244READ8_MEMBER( riot6532_device::read )
257245{
258246   return reg_r(offset, space.debugger_access());
r22524r22525
343331    porta_in_set - set port A input value
344332-------------------------------------------------*/
345333
346void riot6532_porta_in_set(device_t *device, UINT8 data, UINT8 mask)
347{
348   riot6532_device *via = downcast<riot6532_device *>(device);
349   via->porta_in_set(data, mask);
350}
351
352334void riot6532_device::porta_in_set(UINT8 data, UINT8 mask)
353335{
354336   m_port[0].m_in = (m_port[0].m_in & ~mask) | (data & mask);
r22524r22525
360342    portb_in_set - set port B input value
361343-------------------------------------------------*/
362344
363void riot6532_portb_in_set(device_t *device, UINT8 data, UINT8 mask)
364{
365   riot6532_device *via = downcast<riot6532_device *>(device);
366   via->portb_in_set(data, mask);
367}
368
369345void riot6532_device::portb_in_set(UINT8 data, UINT8 mask)
370346{
371347   m_port[1].m_in = (m_port[1].m_in & ~mask) | (data & mask);
r22524r22525
376352    porta_in_get - return port A input value
377353-------------------------------------------------*/
378354
379UINT8 riot6532_porta_in_get(device_t *device)
380{
381   riot6532_device *via = downcast<riot6532_device *>(device);
382   return via->porta_in_get();
383}
384
385355UINT8 riot6532_device::porta_in_get()
386356{
387357   return m_port[0].m_in;
r22524r22525
392362    portb_in_get - return port B input value
393363-------------------------------------------------*/
394364
395UINT8 riot6532_portb_in_get(device_t *device)
396{
397   riot6532_device *via = downcast<riot6532_device *>(device);
398   return via->portb_in_get();
399}
400
401365UINT8 riot6532_device::portb_in_get()
402366{
403367   return m_port[1].m_in;
r22524r22525
408372    porta_in_get - return port A output value
409373-------------------------------------------------*/
410374
411UINT8 riot6532_porta_out_get(device_t *device)
412{
413   riot6532_device *via = downcast<riot6532_device *>(device);
414   return via->porta_out_get();
415}
416
417375UINT8 riot6532_device::porta_out_get()
418376{
419377   return m_port[0].m_out;
r22524r22525
424382    portb_in_get - return port B output value
425383-------------------------------------------------*/
426384
427UINT8 riot6532_portb_out_get(device_t *device)
428{
429   riot6532_device *via = downcast<riot6532_device *>(device);
430   return via->portb_out_get();
431}
432
433385UINT8 riot6532_device::portb_out_get()
434386{
435387   return m_port[1].m_out;
trunk/src/emu/machine/6532riot.h
r22524r22525
113113// device type definition
114114extern const device_type RIOT6532;
115115
116
117
118/***************************************************************************
119    PROTOTYPES
120***************************************************************************/
121
122DECLARE_READ8_DEVICE_HANDLER( riot6532_r );
123DECLARE_WRITE8_DEVICE_HANDLER( riot6532_w );
124
125void riot6532_porta_in_set(device_t *device, UINT8 data, UINT8 mask);
126void riot6532_portb_in_set(device_t *device, UINT8 data, UINT8 mask);
127
128UINT8 riot6532_porta_in_get(device_t *device);
129UINT8 riot6532_portb_in_get(device_t *device);
130
131UINT8 riot6532_porta_out_get(device_t *device);
132UINT8 riot6532_portb_out_get(device_t *device);
133
134116#endif
trunk/src/mess/machine/interpod.c
r22524r22525
111111
112112static ADDRESS_MAP_START( interpod_mem, AS_PROGRAM, 8, interpod_device )
113113   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x3b80) AM_RAM // 6532
114   AM_RANGE(0x0400, 0x041f) AM_MIRROR(0x3be0) AM_DEVREADWRITE_LEGACY(R6532_TAG, riot6532_r, riot6532_w)
114   AM_RANGE(0x0400, 0x041f) AM_MIRROR(0x3be0) AM_DEVREADWRITE(R6532_TAG, riot6532_device, read, write)
115115   AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x9ffe) AM_DEVREADWRITE(MC6850_TAG, acia6850_device, status_read, control_write)
116116   AM_RANGE(0x2001, 0x2001) AM_MIRROR(0x9ffe) AM_DEVREADWRITE(MC6850_TAG, acia6850_device, data_read, data_write)
117117   AM_RANGE(0x4000, 0x47ff) AM_MIRROR(0xb800) AM_ROM AM_REGION(R6502_TAG, 0)
trunk/src/mess/machine/c8280.c
r22524r22525
8686static ADDRESS_MAP_START( c8280_main_mem, AS_PROGRAM, 8, c8280_device )
8787   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x100) AM_RAM // 6532 #1
8888   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x100) AM_RAM // 6532 #2
89   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0xd60) AM_DEVREADWRITE_LEGACY(M6532_0_TAG, riot6532_r, riot6532_w)
90   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0xd60) AM_DEVREADWRITE_LEGACY(M6532_1_TAG, riot6532_r, riot6532_w)
89   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0xd60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write)
90   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0xd60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write)
9191   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0xc00) AM_RAM AM_SHARE("share1")
9292   AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0xc00) AM_RAM AM_SHARE("share2")
9393   AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0xc00) AM_RAM AM_SHARE("share3")
r22524r22525
455455   update_ieee_signals();
456456
457457   // set RIOT PA7
458   riot6532_porta_in_set(m_riot1, !state << 7, 0x80);
458   m_riot1->porta_in_set(!state << 7, 0x80);
459459}
460460
461461
trunk/src/mess/machine/c2040.c
r22524r22525
256256   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
257257   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_RAM // 6532 #1
258258   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM // 6532 #2
259   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_0_TAG, riot6532_r, riot6532_w)
260   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_1_TAG, riot6532_r, riot6532_w)
259   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write)
260   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write)
261261   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1")
262262   AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2")
263263   AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3")
r22524r22525
290290static ADDRESS_MAP_START( c8050_main_mem, AS_PROGRAM, 8, c2040_device )
291291   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_RAM // 6532 #1
292292   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM // 6532 #2
293   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_0_TAG, riot6532_r, riot6532_w)
294   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_1_TAG, riot6532_r, riot6532_w)
293   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write)
294   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write)
295295   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1")
296296   AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2")
297297   AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3")
r22524r22525
16931693   update_ieee_signals();
16941694
16951695   // set RIOT PA7
1696   riot6532_porta_in_set(m_riot1, !state << 7, 0x80);
1696   m_riot1->porta_in_set(!state << 7, 0x80);
16971697}
16981698
16991699
trunk/src/mess/machine/d9060.c
r22524r22525
8989static ADDRESS_MAP_START( d9060_main_mem, AS_PROGRAM, 8, base_d9060_device )
9090   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x0100) AM_RAM // 6532 #1
9191   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x0100) AM_RAM // 6532 #2
92   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_0_TAG, riot6532_r, riot6532_w)
93   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE_LEGACY(M6532_1_TAG, riot6532_r, riot6532_w)
92   AM_RANGE(0x0200, 0x021f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_0_TAG, riot6532_device, read, write)
93   AM_RANGE(0x0280, 0x029f) AM_MIRROR(0x0d60) AM_DEVREADWRITE(M6532_1_TAG, riot6532_device, read, write)
9494   AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share1")
9595   AM_RANGE(0x2000, 0x23ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share2")
9696   AM_RANGE(0x3000, 0x33ff) AM_MIRROR(0x0c00) AM_RAM AM_SHARE("share3")
r22524r22525
559559   update_ieee_signals();
560560
561561   // set RIOT PA7
562   riot6532_porta_in_set(m_riot1, !state << 7, 0x80);
562   m_riot1->porta_in_set(!state << 7, 0x80);
563563}
564564
565565
trunk/src/mess/drivers/aim65.c
r22524r22525
3535   AM_RANGE( 0x1000, 0x9fff ) AM_NOP /* User available expansions */
3636   AM_RANGE( 0xa000, 0xa00f ) AM_MIRROR(0x3f0) AM_DEVREADWRITE("via6522_1", via6522_device, read, write) // user via
3737   AM_RANGE( 0xa400, 0xa47f ) AM_RAM /* RIOT RAM */
38   AM_RANGE( 0xa480, 0xa497 ) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
38   AM_RANGE( 0xa480, 0xa497 ) AM_DEVREADWRITE("riot", riot6532_device, read, write)
3939   AM_RANGE( 0xa498, 0xa7ff ) AM_NOP /* Not available */
4040   AM_RANGE( 0xa800, 0xa80f ) AM_MIRROR(0x3f0) AM_DEVREADWRITE("via6522_0", via6522_device, read, write) // system via
4141   AM_RANGE( 0xac00, 0xac03 ) AM_DEVREADWRITE("pia6821", pia6821_device, read, write)
trunk/src/mess/drivers/sym1.c
r22524r22525
3939   AM_RANGE(0x0c00, 0x0fff) AM_RAMBANK("bank4") AM_SHARE("ram_3k")
4040   AM_RANGE(0x8000, 0x8fff) AM_ROM AM_SHARE("monitor")       /* U20 Monitor ROM */
4141   AM_RANGE(0xa000, 0xa00f) AM_DEVREADWRITE("via6522_0", via6522_device, read, write)      /* U25 VIA #1 */
42   AM_RANGE(0xa400, 0xa40f) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)  /* U27 RIOT */
42   AM_RANGE(0xa400, 0xa40f) AM_DEVREADWRITE("riot", riot6532_device, read, write)  /* U27 RIOT */
4343   AM_RANGE(0xa600, 0xa67f) AM_RAMBANK("bank5") AM_SHARE("riot_ram")  /* U27 RIOT RAM */
4444   AM_RANGE(0xa800, 0xa80f) AM_DEVREADWRITE("via6522_1", via6522_device, read, write)      /* U28 VIA #2 */
4545   AM_RANGE(0xac00, 0xac0f) AM_DEVREADWRITE("via6522_2", via6522_device, read, write)      /* U29 VIA #3 */
trunk/src/mess/drivers/junior.c
r22524r22525
6161   ADDRESS_MAP_UNMAP_HIGH
6262   AM_RANGE(0x0000, 0x03ff) AM_RAM // 1K RAM
6363   AM_RANGE(0x1a00, 0x1a7f) AM_RAM // 6532 RAM
64   AM_RANGE(0x1a80, 0x1aff) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
64   AM_RANGE(0x1a80, 0x1aff) AM_DEVREADWRITE("riot", riot6532_device, read, write)
6565   AM_RANGE(0x1c00, 0x1fff) AM_ROM // Monitor
6666ADDRESS_MAP_END
6767
r22524r22525
143143
144144READ8_MEMBER( junior_state::junior_riot_b_r )
145145{
146   if ( riot6532_portb_out_get(m_riot) & 0x20 )
146   if ( m_riot->portb_out_get() & 0x20 )
147147      return 0xFF;
148148
149149   return 0x7F;
trunk/src/mess/drivers/a7800.c
r22524r22525
6868   AM_RANGE(0x0020, 0x003f) AM_MIRROR(0x300) AM_READWRITE(a7800_MARIA_r, a7800_MARIA_w)
6969   AM_RANGE(0x0040, 0x00ff) AM_READ_BANK("bank5") AM_WRITE(a7800_RAM0_w)   /* RAM (6116 block 0) */
7070   AM_RANGE(0x0140, 0x01ff) AM_RAMBANK("bank6")    /* RAM (6116 block 1) */
71   AM_RANGE(0x0280, 0x02ff) AM_DEVREADWRITE_LEGACY("riot", riot6532_r, riot6532_w)
71   AM_RANGE(0x0280, 0x02ff) AM_DEVREADWRITE("riot", riot6532_device, read, write)
7272   AM_RANGE(0x0450, 0x045f) /*XBOARD POKEY1*/
7373   AM_RANGE(0x0460, 0x046f) /*XBOARD POKEY2*/
7474   AM_RANGE(0x0470, 0x047f) /*XBOARD CTRL*/
trunk/src/mess/drivers/beta.c
r22524r22525
3434
3535static ADDRESS_MAP_START( beta_mem, AS_PROGRAM, 8, beta_state )
3636   AM_RANGE(0x0000, 0x007f) AM_MIRROR(0x7f00) AM_RAM // 6532 RAM
37   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x7f00) AM_DEVREADWRITE_LEGACY(M6532_TAG, riot6532_r, riot6532_w)
37   AM_RANGE(0x0080, 0x00ff) AM_MIRROR(0x7f00) AM_DEVREADWRITE(M6532_TAG, riot6532_device, read, write)
3838   AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x7800) AM_ROM
3939ADDRESS_MAP_END
4040

Previous 199869 Revisions Next


© 1997-2024 The MAME Team