trunk/src/mess/drivers/leapster.c
| r0 | r242008 | |
| 1 | /* |
| 2 | LeapFrog - Leapster |
| 3 | |
| 4 | educational system from 2003, software is all developed in MXFlash |
| 5 | |
| 6 | hwspecs |
| 7 | |
| 8 | |
| 9 | CPU: |
| 10 | Custom ASIC (ARCTangent 5.1 CPU @ 96MHz) |
| 11 | |
| 12 | Memory: |
| 13 | Leapster: 2MB onboard RAM, 256 bytes NVRAM. |
| 14 | Leapster2: 16MB RAM, 128kbytes NVRAM |
| 15 | |
| 16 | Media type: |
| 17 | Cartridges of 4-16MB with between 2 and 512kb NVRAM |
| 18 | |
| 19 | Graphics: |
| 20 | 4Mb ATI chip. |
| 21 | |
| 22 | Audio: |
| 23 | Custom |
| 24 | |
| 25 | Screen: |
| 26 | 160x160 CSTN with touchscreen. |
| 27 | |
| 28 | |
| 29 | The Leapster 2 also has |
| 30 | USB 1.1 (client only) + full-sized SD slot. |
| 31 | |
| 32 | */ |
| 33 | |
| 34 | #include "emu.h" |
| 35 | #include "bus/generic/slot.h" |
| 36 | #include "bus/generic/carts.h" |
| 37 | |
| 38 | |
| 39 | class leapster_state : public driver_device |
| 40 | { |
| 41 | public: |
| 42 | leapster_state(const machine_config &mconfig, device_type type, const char *tag) |
| 43 | : driver_device(mconfig, type, tag), |
| 44 | m_cart(*this, "cartslot") |
| 45 | { } |
| 46 | |
| 47 | |
| 48 | virtual void machine_start(); |
| 49 | virtual void machine_reset(); |
| 50 | |
| 51 | UINT32 screen_update_leapster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 52 | DECLARE_DEVICE_IMAGE_LOAD_MEMBER(leapster_cart); |
| 53 | |
| 54 | protected: |
| 55 | required_device<generic_slot_device> m_cart; |
| 56 | |
| 57 | memory_region *m_cart_rom; |
| 58 | }; |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | static INPUT_PORTS_START( leapster ) |
| 64 | INPUT_PORTS_END |
| 65 | |
| 66 | |
| 67 | |
| 68 | UINT32 leapster_state::screen_update_leapster(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 69 | { |
| 70 | return 0; |
| 71 | } |
| 72 | |
| 73 | DEVICE_IMAGE_LOAD_MEMBER( leapster_state, leapster_cart ) |
| 74 | { |
| 75 | UINT32 size = m_cart->common_get_size("rom"); |
| 76 | |
| 77 | m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); |
| 78 | m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); |
| 79 | |
| 80 | return IMAGE_INIT_PASS; |
| 81 | } |
| 82 | |
| 83 | void leapster_state::machine_start() |
| 84 | { |
| 85 | astring region_tag; |
| 86 | m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG)); |
| 87 | } |
| 88 | |
| 89 | void leapster_state::machine_reset() |
| 90 | { |
| 91 | } |
| 92 | |
| 93 | |
| 94 | |
| 95 | static MACHINE_CONFIG_START( leapster, leapster_state ) |
| 96 | /* basic machine hardware */ |
| 97 | // CPU is ArcTangent A5 |
| 98 | |
| 99 | /* video hardware */ |
| 100 | MCFG_SCREEN_ADD("screen", LCD) |
| 101 | MCFG_SCREEN_REFRESH_RATE(60) |
| 102 | MCFG_SCREEN_SIZE(160, 160) |
| 103 | MCFG_SCREEN_VISIBLE_AREA(0, 160-1, 0, 160-1) |
| 104 | MCFG_SCREEN_UPDATE_DRIVER(leapster_state, screen_update_leapster) |
| 105 | |
| 106 | /* cartridge */ |
| 107 | MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "leapster_cart") |
| 108 | MCFG_GENERIC_EXTENSIONS("bin") |
| 109 | MCFG_GENERIC_LOAD(leapster_state, leapster_cart) |
| 110 | |
| 111 | /* Software lists */ |
| 112 | MCFG_SOFTWARE_LIST_ADD("cart_list", "leapster") |
| 113 | MACHINE_CONFIG_END |
| 114 | |
| 115 | ROM_START(leapster) |
| 116 | ROM_REGION(0x200000, "maincpu", ROMREGION_ERASE00) |
| 117 | ROM_LOAD( "155-10072-a.bin", 0x00000, 0x200000, CRC(af05e5a0) SHA1(d4468d060543ba7e44785041093bc98bcd9afa07) ) |
| 118 | ROM_END |
| 119 | |
| 120 | ROM_START(leapstertv) |
| 121 | ROM_REGION(0x200000, "maincpu", ROMREGION_ERASE00) |
| 122 | ROM_LOAD( "am29pl160cb-90sf.bin", 0x00000, 0x200000, CRC(dc281f1f) SHA1(17588de54ab3bb82801bd5062f3e6aa687412178) ) |
| 123 | ROM_END |
| 124 | |
| 125 | |
| 126 | CONS(2003, leapster, 0, 0, leapster, leapster, driver_device, 0, "LeapFrog", "Leapster (Germany)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IS_SKELETON ) |
| 127 | CONS(2005, leapstertv, leapster, 0, leapster, leapster, driver_device, 0, "LeapFrog", "Leapster TV (Germany)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IS_SKELETON ) |