trunk/src/mess/drivers/alphasma.c
r0 | r17539 | |
| 1 | /*************************************************************************** |
| 2 | |
| 3 | AlphaSmart Pro |
| 4 | |
| 5 | 08/28/2012 Skeleton driver |
| 6 | |
| 7 | ****************************************************************************/ |
| 8 | |
| 9 | #include "emu.h" |
| 10 | #include "cpu/mc68hc11/mc68hc11.h" |
| 11 | #include "rendlay.h" |
| 12 | |
| 13 | class alphasmart_state : public driver_device |
| 14 | { |
| 15 | public: |
| 16 | alphasmart_state(const machine_config &mconfig, device_type type, const char *tag) |
| 17 | : driver_device(mconfig, type, tag), |
| 18 | m_maincpu(*this, "maincpu") |
| 19 | { } |
| 20 | |
| 21 | required_device<cpu_device> m_maincpu; |
| 22 | |
| 23 | virtual void machine_start(); |
| 24 | virtual void palette_init(); |
| 25 | virtual UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 26 | }; |
| 27 | |
| 28 | static ADDRESS_MAP_START(alphasmart_mem, AS_PROGRAM, 8, alphasmart_state) |
| 29 | ADDRESS_MAP_UNMAP_HIGH |
| 30 | AM_RANGE( 0x0000, 0x7fff ) AM_RAM |
| 31 | AM_RANGE( 0x8000, 0xffff ) AM_ROM AM_REGION("maincpu", 0) |
| 32 | ADDRESS_MAP_END |
| 33 | |
| 34 | static ADDRESS_MAP_START(alphasmart_io, AS_IO, 8, alphasmart_state) |
| 35 | ADDRESS_MAP_END |
| 36 | |
| 37 | /* Input ports */ |
| 38 | static INPUT_PORTS_START( alphasmart ) |
| 39 | INPUT_PORTS_END |
| 40 | |
| 41 | void alphasmart_state::palette_init() |
| 42 | { |
| 43 | palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148)); |
| 44 | palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88)); |
| 45 | } |
| 46 | |
| 47 | void alphasmart_state::machine_start() |
| 48 | { |
| 49 | } |
| 50 | |
| 51 | UINT32 alphasmart_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) |
| 52 | { |
| 53 | return 0; |
| 54 | } |
| 55 | |
| 56 | static const hc11_config alphasmart_hc11_config = |
| 57 | { |
| 58 | 0, //has extended internal I/O |
| 59 | 192, //internal RAM size |
| 60 | 0x00 //registers are at 0-0x3f |
| 61 | }; |
| 62 | |
| 63 | static MACHINE_CONFIG_START( alphasmart, alphasmart_state ) |
| 64 | /* basic machine hardware */ |
| 65 | MCFG_CPU_ADD("maincpu", MC68HC11, XTAL_8MHz/2) // MC68HC11D0, XTAL is 8 Mhz, unknown divider |
| 66 | MCFG_CPU_PROGRAM_MAP(alphasmart_mem) |
| 67 | MCFG_CPU_IO_MAP(alphasmart_io) |
| 68 | MCFG_CPU_CONFIG(alphasmart_hc11_config) |
| 69 | |
| 70 | /* video hardware */ |
| 71 | MCFG_SCREEN_ADD("screen", LCD) |
| 72 | MCFG_SCREEN_REFRESH_RATE(50) |
| 73 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 74 | MCFG_SCREEN_UPDATE_DRIVER(alphasmart_state, screen_update) |
| 75 | MCFG_SCREEN_SIZE(6*40, 9*4) |
| 76 | MCFG_SCREEN_VISIBLE_AREA(0, (6*40)-1, 0, (9*4)-1) |
| 77 | MCFG_PALETTE_LENGTH(2) |
| 78 | MCFG_DEFAULT_LAYOUT(layout_lcd) |
| 79 | MACHINE_CONFIG_END |
| 80 | |
| 81 | /* ROM definition */ |
| 82 | ROM_START( alphasma ) |
| 83 | ROM_REGION( 0x8000, "maincpu", 0 ) |
| 84 | ROM_LOAD( "alphasmartpro212.rom", 0x0000, 0x8000, CRC(896ddf1c) SHA1(c3c6a421c9ced92db97431d04b4a3f09a39de716) ) // Checksum 8D24 on label |
| 85 | ROM_END |
| 86 | |
| 87 | |
| 88 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 89 | COMP( 1995, alphasma, 0, 0, alphasmart, alphasmart, driver_device, 0, "Intelligent Peripheral Devices", "AlphaSmart Pro", GAME_NOT_WORKING | GAME_NO_SOUND ) |