src/mess/drivers/jr200.c
| r5757 | r5758 | |
| 19 | 19 | #include "driver.h" |
| 20 | 20 | #include "cpu/m6800/m6800.h" |
| 21 | 21 | |
| 22 | static UINT8 *textram; |
| 23 | |
| 24 | static READ8_HANDLER( test_r ) |
| 25 | { |
| 26 | return 1; |
| 27 | } |
| 28 | |
| 22 | 29 | static ADDRESS_MAP_START(jr200_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 23 | 30 | AM_RANGE(0x0000, 0x7fff) AM_RAM |
| 31 | AM_RANGE(0x000d, 0x000d) AM_RAM AM_READ(test_r) |
| 24 | 32 | AM_RANGE(0xa000, 0xbfff) AM_ROM // basic? |
| 25 | | AM_RANGE(0xc000, 0xcfff) AM_RAM // videoram, colorram |
| 33 | AM_RANGE(0xc000, 0xcfff) AM_RAM AM_BASE(&textram) // videoram, colorram |
| 26 | 34 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 27 | 35 | ADDRESS_MAP_END |
| 28 | 36 | |
| r5757 | r5758 | |
| 44 | 52 | |
| 45 | 53 | static VIDEO_UPDATE( jr200 ) |
| 46 | 54 | { |
| 47 | | return 0; |
| 55 | int i,j; |
| 56 | const gfx_element *gfx = screen->machine->gfx[0]; |
| 57 | |
| 58 | for (i = 0; i < 0x02ff; i += 0x20) |
| 59 | for (j = 0; j < 0x20; j++) |
| 60 | { |
| 61 | UINT8 code = textram[0x0100 + i + j]; |
| 62 | UINT8 col = textram[0x0500 + i + j]; |
| 63 | |
| 64 | drawgfx_transpen(bitmap, cliprect, gfx, |
| 65 | code,col, |
| 66 | 0, 0, |
| 67 | j * 8, (i >> 5) * 8, 15); |
| 68 | } |
| 69 | return 0; |
| 48 | 70 | } |
| 49 | 71 | |
| 72 | static const gfx_layout tiles8x8_layout = |
| 73 | { |
| 74 | 8,8, |
| 75 | RGN_FRAC(1,1), |
| 76 | 1, |
| 77 | { 0 }, |
| 78 | { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, |
| 79 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, |
| 80 | 8*8 |
| 81 | }; |
| 82 | |
| 83 | static GFXDECODE_START( jr200 ) |
| 84 | GFXDECODE_ENTRY( "char", 0, tiles8x8_layout, 0, 0x100 ) |
| 85 | GFXDECODE_END |
| 86 | |
| 50 | 87 | static MACHINE_DRIVER_START( jr200 ) |
| 51 | | /* basic machine hardware */ |
| 52 | | MDRV_CPU_ADD("maincpu", M6802, XTAL_4MHz) /* MN1800A */ |
| 53 | | MDRV_CPU_PROGRAM_MAP(jr200_mem) |
| 54 | | MDRV_CPU_IO_MAP(jr200_io) |
| 88 | /* basic machine hardware */ |
| 89 | MDRV_CPU_ADD("maincpu", M6802, XTAL_4MHz) /* MN1800A */ |
| 90 | MDRV_CPU_PROGRAM_MAP(jr200_mem) |
| 91 | MDRV_CPU_IO_MAP(jr200_io) |
| 55 | 92 | /* |
| 56 | | MDRV_CPU_ADD("mn1544", MN1544, ?) |
| 93 | MDRV_CPU_ADD("mn1544", MN1544, ?) |
| 57 | 94 | */ |
| 58 | | MDRV_MACHINE_RESET(jr200) |
| 95 | MDRV_MACHINE_RESET(jr200) |
| 59 | 96 | |
| 60 | | /* video hardware */ |
| 61 | | MDRV_SCREEN_ADD("screen", RASTER) |
| 62 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 63 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 64 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 65 | | MDRV_SCREEN_SIZE(640, 480) |
| 66 | | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 67 | | MDRV_PALETTE_LENGTH(2) |
| 68 | | MDRV_PALETTE_INIT(black_and_white) |
| 97 | /* video hardware */ |
| 98 | MDRV_SCREEN_ADD("screen", RASTER) |
| 99 | MDRV_SCREEN_REFRESH_RATE(50) |
| 100 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 101 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 102 | MDRV_SCREEN_SIZE(256, 192) |
| 103 | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1) |
| 69 | 104 | |
| 70 | | MDRV_VIDEO_START(jr200) |
| 71 | | MDRV_VIDEO_UPDATE(jr200) |
| 105 | MDRV_GFXDECODE(jr200) |
| 106 | MDRV_PALETTE_LENGTH(255) |
| 107 | |
| 108 | MDRV_VIDEO_START(jr200) |
| 109 | MDRV_VIDEO_UPDATE(jr200) |
| 72 | 110 | MACHINE_DRIVER_END |
| 73 | 111 | |
| 74 | 112 | static SYSTEM_CONFIG_START(jr200) |