Previous 199869 Revisions Next

r21226 Wednesday 20th February, 2013 at 19:43:23 UTC by Sandro Ronco
Added READ/WRITE_MEMBER to the intelfsh device and removed some trampolines. (nw)
[src/emu/machine]intelfsh.h
[src/mess/drivers]cybiko.c geniusiq.c
[src/mess/includes]cybiko.h
[src/mess/machine]cybiko.c

trunk/src/emu/machine/intelfsh.h
r21225r21226
165165   // public interface
166166   UINT8 read(offs_t offset) { return read_full(offset); }
167167   void write(offs_t offset, UINT8 data) { write_full(offset, data); }
168   DECLARE_READ8_MEMBER(read) { return read_full(offset); }
169   DECLARE_WRITE8_MEMBER(write) { write_full(offset, data); }
168170
169171   UINT8 read_raw(offs_t offset) { return m_addrspace[0]->read_byte(offset); }
170172   void write_raw(offs_t offset, UINT8 data) { m_addrspace[0]->write_byte(offset, data); }
r21225r21226
183185   // public interface
184186   UINT16 read(offs_t offset) { return read_full(offset); }
185187   void write(offs_t offset, UINT16 data) { write_full(offset, data); }
188   DECLARE_READ16_MEMBER(read) { return read_full(offset); }
189   DECLARE_WRITE16_MEMBER(write) { write_full(offset, data); }
186190
187191   UINT16 read_raw(offs_t offset) { return m_addrspace[0]->read_word(offset * 2); }
188192   void write_raw(offs_t offset, UINT16 data) { m_addrspace[0]->write_word(offset * 2, data); }
trunk/src/mess/machine/cybiko.c
r21225r21226
4949   running_machine &machine = image.device().machine();
5050   cybiko_state *state = machine.driver_data<cybiko_state>();
5151   address_space &dest = state->m_maincpu->space(AS_PROGRAM);
52   UINT32 size = MIN(image.length(), 0x84000);
52   UINT32 size = MIN(image.length(), RAMDISK_SIZE);
5353
5454   UINT8 *buffer = global_alloc_array(UINT8, size);
5555   image.fread(buffer, size);
r21225r21226
196196// READ/WRITE HANDLERS //
197197/////////////////////////
198198
199READ8_MEMBER( cybiko_state::cybikov2_flash_r )
200{
201   return m_flash2->read(offset);
202}
203
204READ16_MEMBER( cybiko_state::cybikoxt_flash_r )
205{
206   return m_flashxt->read(offset);
207}
208
209199READ16_MEMBER( cybiko_state::cybiko_lcd_r )
210200{
211201   UINT16 data = 0;
trunk/src/mess/includes/cybiko.h
r21225r21226
5252   m_speaker(*this, SPEAKER_TAG),
5353   m_rtc(*this, "rtc"),
5454   m_ram(*this, RAM_TAG),
55   m_flash1(*this, "flash1"),
56   m_flash2(*this, "flash2"),
57   m_flashxt(*this, "flashxt")
55   m_flash1(*this, "flash1")
5856   { }
5957
6058   CYBIKO_RS232 m_rs232;
r21225r21226
7068   DECLARE_WRITE8_MEMBER(cybikov1_io_reg_w);
7169   DECLARE_WRITE8_MEMBER(cybikov2_io_reg_w);
7270   DECLARE_WRITE8_MEMBER(cybikoxt_io_reg_w);
73   DECLARE_READ8_MEMBER(cybikov2_flash_r);
74   DECLARE_READ16_MEMBER(cybikoxt_flash_r);
7571   int cybiko_key_r( offs_t offset, int mem_mask);
7672   void cybiko_rs232_write_byte(int data);
7773   void cybiko_rs232_pin_sck(int data);
r21225r21226
8884   required_device<pcf8593_device> m_rtc;
8985   required_device<ram_device> m_ram;
9086   optional_device<at45db041_device> m_flash1;
91   optional_device<intelfsh8_device> m_flash2;
92   optional_device<intelfsh16_device> m_flashxt;
9387   DECLARE_DRIVER_INIT(cybikoxt);
9488   DECLARE_DRIVER_INIT(cybiko);
9589   virtual void machine_start();
trunk/src/mess/drivers/cybiko.c
r21225r21226
8080// 256 kbyte ram + 256 kbyte memory mapped flash
8181static ADDRESS_MAP_START( cybikov2_mem, AS_PROGRAM, 16, cybiko_state )
8282   AM_RANGE( 0x000000, 0x007fff ) AM_ROM
83   AM_RANGE( 0x100000, 0x13ffff ) AM_READ8(cybikov2_flash_r, 0xffff) AM_MIRROR( 0x0c0000 )
83   AM_RANGE( 0x100000, 0x13ffff ) AM_DEVREAD8("flash2", sst_39vf020_device, read, 0xffff) AM_MIRROR( 0x0c0000 )
8484   AM_RANGE( 0x600000, 0x600001 ) AM_READWRITE( cybiko_lcd_r, cybiko_lcd_w ) AM_MIRROR( 0x1ffffe )
8585   AM_RANGE( 0xe00000, 0xffdbff ) AM_READ( cybikov2_key_r )
8686ADDRESS_MAP_END
r21225r21226
9090   AM_RANGE( 0x000000, 0x007fff ) AM_ROM AM_MIRROR( 0x038000 )
9191   AM_RANGE( 0x100000, 0x100001 ) AM_READWRITE( cybiko_lcd_r, cybiko_lcd_w )
9292   AM_RANGE( 0x200000, 0x200003 ) AM_WRITE( cybiko_usb_w )
93   AM_RANGE( 0x600000, 0x67ffff ) AM_READ(cybikoxt_flash_r) AM_MIRROR( 0x180000 )
93   AM_RANGE( 0x600000, 0x67ffff ) AM_DEVREAD("flashxt", sst_39vf400a_device, read) AM_MIRROR( 0x180000 )
9494   AM_RANGE( 0xe00000, 0xefffff ) AM_READ( cybikoxt_key_r )
9595ADDRESS_MAP_END
9696
trunk/src/mess/drivers/geniusiq.c
r21225r21226
206206   geniusiq_state(const machine_config &mconfig, device_type type, const char *tag)
207207      : driver_device(mconfig, type, tag),
208208      m_maincpu(*this, "maincpu"),
209      m_flash(*this, "flash"),
210209      m_vram(*this, "vram"),
211210      m_mouse_gfx(*this, "mouse_gfx"),
212211      m_cart_state(IQ128_NO_CART)
213212   { }
214213
215214   required_device<cpu_device> m_maincpu;
216   required_device<intelfsh8_device> m_flash;
217215   required_shared_ptr<UINT16> m_vram;
218216   required_shared_ptr<UINT16> m_mouse_gfx;
219217
r21225r21226
222220   virtual void palette_init();
223221   virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
224222
225   DECLARE_READ8_MEMBER(flash_r);
226   DECLARE_WRITE8_MEMBER(flash_w);
227223   DECLARE_READ16_MEMBER(input_r);
228224   DECLARE_WRITE16_MEMBER(mouse_pos_w);
229225   DECLARE_INPUT_CHANGED_MEMBER(send_input);
r21225r21226
338334   return 0;
339335}
340336
341READ8_MEMBER(geniusiq_state::flash_r)
342{
343   return m_flash->read(offset);
344}
345
346WRITE8_MEMBER(geniusiq_state::flash_w)
347{
348   m_flash->write(offset, data);
349}
350
351337READ16_MEMBER( geniusiq_state::cart_state_r )
352338{
353339   return m_cart_state;
r21225r21226
478464   AM_RANGE(0x200000, 0x23FFFF) AM_RAM
479465   AM_RANGE(0x300000, 0x30FFFF) AM_RAM     AM_SHARE("vram")
480466   AM_RANGE(0x310000, 0x31FFFF) AM_RAM
481   AM_RANGE(0x400000, 0x41ffff) AM_MIRROR(0x0e0000) AM_READWRITE8(flash_r, flash_w, 0x00ff)
467   AM_RANGE(0x400000, 0x41ffff) AM_MIRROR(0x0e0000) AM_DEVREADWRITE8("flash", intelfsh8_device, read, write, 0x00ff)
482468   AM_RANGE(0x600300, 0x600301) AM_READ(input_r)
483469   //AM_RANGE(0x600500, 0x60050f)                      // read during IRQ 5
484470   //AM_RANGE(0x600600, 0x600605)                      // sound ??

Previous 199869 Revisions Next


© 1997-2024 The MAME Team