trunk/src/emu/machine/intelfsh.h
| r21225 | r21226 | |
| 165 | 165 | // public interface |
| 166 | 166 | UINT8 read(offs_t offset) { return read_full(offset); } |
| 167 | 167 | 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); } |
| 168 | 170 | |
| 169 | 171 | UINT8 read_raw(offs_t offset) { return m_addrspace[0]->read_byte(offset); } |
| 170 | 172 | void write_raw(offs_t offset, UINT8 data) { m_addrspace[0]->write_byte(offset, data); } |
| r21225 | r21226 | |
| 183 | 185 | // public interface |
| 184 | 186 | UINT16 read(offs_t offset) { return read_full(offset); } |
| 185 | 187 | 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); } |
| 186 | 190 | |
| 187 | 191 | UINT16 read_raw(offs_t offset) { return m_addrspace[0]->read_word(offset * 2); } |
| 188 | 192 | void write_raw(offs_t offset, UINT16 data) { m_addrspace[0]->write_word(offset * 2, data); } |
trunk/src/mess/machine/cybiko.c
| r21225 | r21226 | |
| 49 | 49 | running_machine &machine = image.device().machine(); |
| 50 | 50 | cybiko_state *state = machine.driver_data<cybiko_state>(); |
| 51 | 51 | address_space &dest = state->m_maincpu->space(AS_PROGRAM); |
| 52 | | UINT32 size = MIN(image.length(), 0x84000); |
| 52 | UINT32 size = MIN(image.length(), RAMDISK_SIZE); |
| 53 | 53 | |
| 54 | 54 | UINT8 *buffer = global_alloc_array(UINT8, size); |
| 55 | 55 | image.fread(buffer, size); |
| r21225 | r21226 | |
| 196 | 196 | // READ/WRITE HANDLERS // |
| 197 | 197 | ///////////////////////// |
| 198 | 198 | |
| 199 | | READ8_MEMBER( cybiko_state::cybikov2_flash_r ) |
| 200 | | { |
| 201 | | return m_flash2->read(offset); |
| 202 | | } |
| 203 | | |
| 204 | | READ16_MEMBER( cybiko_state::cybikoxt_flash_r ) |
| 205 | | { |
| 206 | | return m_flashxt->read(offset); |
| 207 | | } |
| 208 | | |
| 209 | 199 | READ16_MEMBER( cybiko_state::cybiko_lcd_r ) |
| 210 | 200 | { |
| 211 | 201 | UINT16 data = 0; |
trunk/src/mess/includes/cybiko.h
| r21225 | r21226 | |
| 52 | 52 | m_speaker(*this, SPEAKER_TAG), |
| 53 | 53 | m_rtc(*this, "rtc"), |
| 54 | 54 | 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") |
| 58 | 56 | { } |
| 59 | 57 | |
| 60 | 58 | CYBIKO_RS232 m_rs232; |
| r21225 | r21226 | |
| 70 | 68 | DECLARE_WRITE8_MEMBER(cybikov1_io_reg_w); |
| 71 | 69 | DECLARE_WRITE8_MEMBER(cybikov2_io_reg_w); |
| 72 | 70 | DECLARE_WRITE8_MEMBER(cybikoxt_io_reg_w); |
| 73 | | DECLARE_READ8_MEMBER(cybikov2_flash_r); |
| 74 | | DECLARE_READ16_MEMBER(cybikoxt_flash_r); |
| 75 | 71 | int cybiko_key_r( offs_t offset, int mem_mask); |
| 76 | 72 | void cybiko_rs232_write_byte(int data); |
| 77 | 73 | void cybiko_rs232_pin_sck(int data); |
| r21225 | r21226 | |
| 88 | 84 | required_device<pcf8593_device> m_rtc; |
| 89 | 85 | required_device<ram_device> m_ram; |
| 90 | 86 | optional_device<at45db041_device> m_flash1; |
| 91 | | optional_device<intelfsh8_device> m_flash2; |
| 92 | | optional_device<intelfsh16_device> m_flashxt; |
| 93 | 87 | DECLARE_DRIVER_INIT(cybikoxt); |
| 94 | 88 | DECLARE_DRIVER_INIT(cybiko); |
| 95 | 89 | virtual void machine_start(); |
trunk/src/mess/drivers/cybiko.c
| r21225 | r21226 | |
| 80 | 80 | // 256 kbyte ram + 256 kbyte memory mapped flash |
| 81 | 81 | static ADDRESS_MAP_START( cybikov2_mem, AS_PROGRAM, 16, cybiko_state ) |
| 82 | 82 | 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 ) |
| 84 | 84 | AM_RANGE( 0x600000, 0x600001 ) AM_READWRITE( cybiko_lcd_r, cybiko_lcd_w ) AM_MIRROR( 0x1ffffe ) |
| 85 | 85 | AM_RANGE( 0xe00000, 0xffdbff ) AM_READ( cybikov2_key_r ) |
| 86 | 86 | ADDRESS_MAP_END |
| r21225 | r21226 | |
| 90 | 90 | AM_RANGE( 0x000000, 0x007fff ) AM_ROM AM_MIRROR( 0x038000 ) |
| 91 | 91 | AM_RANGE( 0x100000, 0x100001 ) AM_READWRITE( cybiko_lcd_r, cybiko_lcd_w ) |
| 92 | 92 | 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 ) |
| 94 | 94 | AM_RANGE( 0xe00000, 0xefffff ) AM_READ( cybikoxt_key_r ) |
| 95 | 95 | ADDRESS_MAP_END |
| 96 | 96 | |
trunk/src/mess/drivers/geniusiq.c
| r21225 | r21226 | |
| 206 | 206 | geniusiq_state(const machine_config &mconfig, device_type type, const char *tag) |
| 207 | 207 | : driver_device(mconfig, type, tag), |
| 208 | 208 | m_maincpu(*this, "maincpu"), |
| 209 | | m_flash(*this, "flash"), |
| 210 | 209 | m_vram(*this, "vram"), |
| 211 | 210 | m_mouse_gfx(*this, "mouse_gfx"), |
| 212 | 211 | m_cart_state(IQ128_NO_CART) |
| 213 | 212 | { } |
| 214 | 213 | |
| 215 | 214 | required_device<cpu_device> m_maincpu; |
| 216 | | required_device<intelfsh8_device> m_flash; |
| 217 | 215 | required_shared_ptr<UINT16> m_vram; |
| 218 | 216 | required_shared_ptr<UINT16> m_mouse_gfx; |
| 219 | 217 | |
| r21225 | r21226 | |
| 222 | 220 | virtual void palette_init(); |
| 223 | 221 | virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 224 | 222 | |
| 225 | | DECLARE_READ8_MEMBER(flash_r); |
| 226 | | DECLARE_WRITE8_MEMBER(flash_w); |
| 227 | 223 | DECLARE_READ16_MEMBER(input_r); |
| 228 | 224 | DECLARE_WRITE16_MEMBER(mouse_pos_w); |
| 229 | 225 | DECLARE_INPUT_CHANGED_MEMBER(send_input); |
| r21225 | r21226 | |
| 338 | 334 | return 0; |
| 339 | 335 | } |
| 340 | 336 | |
| 341 | | READ8_MEMBER(geniusiq_state::flash_r) |
| 342 | | { |
| 343 | | return m_flash->read(offset); |
| 344 | | } |
| 345 | | |
| 346 | | WRITE8_MEMBER(geniusiq_state::flash_w) |
| 347 | | { |
| 348 | | m_flash->write(offset, data); |
| 349 | | } |
| 350 | | |
| 351 | 337 | READ16_MEMBER( geniusiq_state::cart_state_r ) |
| 352 | 338 | { |
| 353 | 339 | return m_cart_state; |
| r21225 | r21226 | |
| 478 | 464 | AM_RANGE(0x200000, 0x23FFFF) AM_RAM |
| 479 | 465 | AM_RANGE(0x300000, 0x30FFFF) AM_RAM AM_SHARE("vram") |
| 480 | 466 | 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) |
| 482 | 468 | AM_RANGE(0x600300, 0x600301) AM_READ(input_r) |
| 483 | 469 | //AM_RANGE(0x600500, 0x60050f) // read during IRQ 5 |
| 484 | 470 | //AM_RANGE(0x600600, 0x600605) // sound ?? |