trunk/src/mess/drivers/uzebox.c
| r20795 | r20796 | |
| 44 | 44 | virtual void machine_start(); |
| 45 | 45 | virtual void machine_reset(); |
| 46 | 46 | void line_update(); |
| 47 | | int cart_load(device_image_interface &image); |
| 48 | 47 | UINT32 screen_update_uzebox(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 49 | 48 | DECLARE_DEVICE_IMAGE_LOAD_MEMBER(uzebox_cart); |
| 50 | 49 | |
| r20795 | r20796 | |
| 263 | 262 | return 0; |
| 264 | 263 | } |
| 265 | 264 | |
| 266 | | int uzebox_state::cart_load(device_image_interface &image) |
| 265 | DEVICE_IMAGE_LOAD_MEMBER(uzebox_state,uzebox_cart) |
| 267 | 266 | { |
| 268 | 267 | UINT8* rom = (UINT8*)(*memregion("maincpu")); |
| 269 | 268 | |
| r20795 | r20796 | |
| 291 | 290 | return IMAGE_INIT_PASS; |
| 292 | 291 | } |
| 293 | 292 | |
| 294 | | DEVICE_IMAGE_LOAD_MEMBER(uzebox_state,uzebox_cart) |
| 295 | | { |
| 296 | | return cart_load(image); |
| 297 | | } |
| 298 | 293 | |
| 299 | 294 | /****************************************************\ |
| 300 | 295 | * Machine definition * |
trunk/src/mess/drivers/geniusiq.c
| r20795 | r20796 | |
| 234 | 234 | DECLARE_WRITE16_MEMBER(gfx_idx_w); |
| 235 | 235 | void queue_input(UINT16 data); |
| 236 | 236 | DECLARE_READ16_MEMBER(cart_state_r); |
| 237 | | int cart_load(device_image_interface &image); |
| 238 | | void cart_unload(device_image_interface &image); |
| 239 | 237 | |
| 240 | 238 | DECLARE_READ16_MEMBER(unk0_r) { return 0; } |
| 241 | 239 | DECLARE_READ16_MEMBER(unk_r) { return machine().rand(); } |
| r20795 | r20796 | |
| 723 | 721 | m_mouse_gfx_posy = 0; |
| 724 | 722 | } |
| 725 | 723 | |
| 726 | | int geniusiq_state::cart_load(device_image_interface &image) |
| 724 | DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state,iq128_cart) |
| 727 | 725 | { |
| 728 | 726 | if (image.software_entry() == NULL) |
| 729 | 727 | { |
| r20795 | r20796 | |
| 758 | 756 | return IMAGE_INIT_PASS; |
| 759 | 757 | } |
| 760 | 758 | |
| 761 | | void geniusiq_state::cart_unload(device_image_interface &image) |
| 759 | DEVICE_IMAGE_UNLOAD_MEMBER(geniusiq_state,iq128_cart) |
| 762 | 760 | { |
| 763 | 761 | memset(m_cart, 0xff, memregion("cart")->bytes()); |
| 764 | 762 | m_cart_state = IQ128_NO_CART; |
| 765 | 763 | } |
| 766 | 764 | |
| 767 | | DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state,iq128_cart) |
| 768 | | { |
| 769 | | return cart_load(image); |
| 770 | | } |
| 771 | 765 | |
| 772 | | DEVICE_IMAGE_UNLOAD_MEMBER(geniusiq_state,iq128_cart) |
| 773 | | { |
| 774 | | cart_unload(image); |
| 775 | | } |
| 776 | | |
| 777 | 766 | static MACHINE_CONFIG_START( iq128, geniusiq_state ) |
| 778 | 767 | /* basic machine hardware */ |
| 779 | 768 | MCFG_CPU_ADD("maincpu", M68000, XTAL_32MHz/2) // The main crystal is at 32MHz, not sure whats the CPU freq |