Previous 15994 Revisions Next

r3328 Thursday 25th September, 2008 at 17:39:39 UTC by Miodrag Milanović
[MIKROSHA] Memory map updated
[src/mess/drivers]mikrosha.c

src/mess/drivers/mikrosha.c
r3327r3328
1111#include "cpu/i8085/i8085.h"
1212#include "machine/8255ppi.h"
1313#include "machine/8257dma.h"
14#include "machine/pit8253.h"
1415#include "video/i8275.h"
1516#include "devices/cassette.h"
1617#include "formats/rk_cas.h"
r3327r3328
2021static ADDRESS_MAP_START(mikrosha_mem, ADDRESS_SPACE_PROGRAM, 8)
2122    AM_RANGE( 0x0000, 0x0fff ) AM_RAMBANK(1) // First bank
2223    AM_RANGE( 0x1000, 0x7fff ) AM_RAM // RAM
23    AM_RANGE( 0x8000, 0xbfff ) AM_READ(radio_cpu_state_r)
24    AM_RANGE( 0x8000, 0xbfff ) AM_READ(radio_cpu_state_r) // Not connected
2425    AM_RANGE( 0xc000, 0xc003 ) AM_DEVREADWRITE(PPI8255, "ppi8255_1", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc)
2526    AM_RANGE( 0xc800, 0xc803 ) AM_DEVREADWRITE(PPI8255, "ppi8255_2", ppi8255_r, ppi8255_w) AM_MIRROR(0x07fc)
2627    AM_RANGE( 0xd000, 0xd001 ) AM_DEVREADWRITE(I8275, "i8275", i8275_r, i8275_w) AM_MIRROR(0x07fe) // video
27    //AM_RANGE( 0xd800, 0xd603 ) AM_MIRROR(0x07fc) // Timer
28    AM_RANGE( 0xd803, 0xd803 ) AM_READ(radio_cpu_state_r) AM_MIRROR(0x07fc) // Not connected
29//    AM_RANGE( 0xd800, 0xd803 ) AM_DEVREADWRITE(PIT8253, "pit8253", pit8253_r,pit8253_w) AM_MIRROR(0x07fc) // Timer
30    AM_RANGE( 0xe000, 0xf7ff ) AM_READ(radio_cpu_state_r) // Not connected
2831     AM_RANGE( 0xf800, 0xffff ) AM_DEVWRITE(DMA8257, "dma8257", dma8257_w)    // DMA
2932    AM_RANGE( 0xf800, 0xffff ) AM_ROM  // System ROM
3033ADDRESS_MAP_END
r3327r3328
132135
133136static OPBASE_HANDLER( mikrosha_opbase )
134137{   
135   if (address >= 0x8000 && address <=0xBFFF) {
138   if (address >= 0x8000 && address <=0xFFFF) {
136139         opbase->mask = 0xffff;
137140         opbase->ram = mikrosha_io_mirror;
138141         opbase->rom = mikrosha_io_mirror;
139142         opbase->mem_min = 0x8000;
140         opbase->mem_max = 0xbfff;
143         opbase->mem_max = 0xffff;
141144         mikrosha_io_mirror[address] = cpunum_get_reg(0, I8080_STATUS);
142145   }
143146   return address;
r3327r3328
145148
146149static MACHINE_START( mikrosha )
147150{
148   mikrosha_io_mirror = auto_malloc( 0xc000 );
151   mikrosha_io_mirror = auto_malloc( 0x10000 );
149152   memory_set_opbase_handler( 0, mikrosha_opbase );
150153}
151154
155static PIT8253_OUTPUT_CHANGED(mikrosha_pit_out2)
156{
157
158}
159
160const struct pit8253_config mikrosha_pit8253_intf =
161{
162   {
163      {
164         0,
165         NULL
166      },
167      {
168         0,
169         NULL
170      },
171      {
172         2000000,
173         mikrosha_pit_out2
174      }
175   }
176};
177
152178static MACHINE_DRIVER_START( mikrosha )
153179  /* basic machine hardware */
154180  MDRV_CPU_ADD("main", 8080, XTAL_16MHz / 9)
r3327r3328
165191
166192   MDRV_DEVICE_ADD( "i8275", I8275 )
167193   MDRV_DEVICE_CONFIG(mikrosha_i8275_interface)
168    /* video hardware */
194
195   MDRV_DEVICE_ADD( "pit8253", PIT8253 )
196   MDRV_DEVICE_CONFIG( mikrosha_pit8253_intf )
197
198  /* video hardware */
169199   MDRV_SCREEN_ADD("main", RASTER)
170200   MDRV_SCREEN_REFRESH_RATE(50)
171201   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team