src/mess/drivers/jr200.c
| r5831 | r5832 | |
| 20 | 20 | #include "cpu/m6800/m6800.h" |
| 21 | 21 | |
| 22 | 22 | static UINT8 *textram; |
| 23 | static UINT8 *border; |
| 23 | 24 | static UINT8 io_reg[0x20] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 24 | 25 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
| 25 | 26 | |
| r5831 | r5832 | |
| 151 | 152 | AM_RANGE(0xa000, 0xbfff) AM_ROM |
| 152 | 153 | AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_BASE(&textram) |
| 153 | 154 | AM_RANGE(0xc800, 0xc81f) AM_READWRITE(io_reg_r, io_reg_w) |
| 155 | AM_RANGE(0xca00, 0xca00) AM_RAM AM_BASE(&border) |
| 154 | 156 | AM_RANGE(0xe000, 0xffff) AM_ROM |
| 155 | 157 | ADDRESS_MAP_END |
| 156 | 158 | |
| r5831 | r5832 | |
| 282 | 284 | int i,j; |
| 283 | 285 | const gfx_element *gfx = screen->machine->gfx[0]; |
| 284 | 286 | |
| 287 | bitmap_fill(bitmap, cliprect, border[0x0000] * 2 + 1); |
| 288 | |
| 285 | 289 | for (i = 0; i < 0x02ff; i += 0x20) |
| 286 | 290 | for (j = 0; j < 0x20; j++) |
| 287 | 291 | { |
| r5831 | r5832 | |
| 294 | 298 | UINT8 pixel00 = (textram[0x0100 + i + j] >> 0) & 0x07; |
| 295 | 299 | UINT8 pixel11 = (textram[0x0500 + i + j] >> 3) & 0x07; |
| 296 | 300 | UINT8 pixel10 = (textram[0x0500 + i + j] >> 0) & 0x07; |
| 297 | | plot_box(bitmap, j * 8 , (i >> 5) * 8 , 4, 4, pixel00 * 2 + 1); |
| 298 | | plot_box(bitmap, j * 8 + 4, (i >> 5) * 8 , 4, 4, pixel01 * 2 + 1); |
| 299 | | plot_box(bitmap, j * 8 , (i >> 5) * 8 + 4, 4, 4, pixel10 * 2 + 1); |
| 300 | | plot_box(bitmap, j * 8 + 4, (i >> 5) * 8 + 4, 4, 4, pixel11 * 2 + 1); |
| 301 | plot_box(bitmap, 16 + j * 8 , 16 + (i >> 5) * 8 , 4, 4, pixel00 * 2 + 1); |
| 302 | plot_box(bitmap, 16 + j * 8 + 4, 16 + (i >> 5) * 8 , 4, 4, pixel01 * 2 + 1); |
| 303 | plot_box(bitmap, 16 + j * 8 , 16 + (i >> 5) * 8 + 4, 4, 4, pixel10 * 2 + 1); |
| 304 | plot_box(bitmap, 16 + j * 8 + 4, 16 + (i >> 5) * 8 + 4, 4, 4, pixel11 * 2 + 1); |
| 301 | 305 | } |
| 302 | 306 | else |
| 303 | 307 | { |
| 304 | | drawgfx_transpen(bitmap, cliprect, gfx, code, col & 0x3f, 0, 0, j * 8, (i >> 5) * 8, 15); |
| 308 | drawgfx_transpen(bitmap, cliprect, gfx, code, col & 0x3f, 0, 0, 16 + j * 8, 16 + (i >> 5) * 8, 15); |
| 305 | 309 | } |
| 306 | 310 | } |
| 307 | 311 | return 0; |
| r5831 | r5832 | |
| 339 | 343 | MDRV_CPU_PROGRAM_MAP(jr200_mem) |
| 340 | 344 | MDRV_CPU_IO_MAP(jr200_io) |
| 341 | 345 | // MDRV_CPU_VBLANK_INT("screen", jr200_irq) |
| 342 | | MDRV_CPU_PERIODIC_INT(jr200_nmi,60) |
| 346 | MDRV_CPU_PERIODIC_INT(jr200_nmi,10) |
| 343 | 347 | MDRV_CPU_PERIODIC_INT(jr200_irq,10) |
| 344 | 348 | /* |
| 345 | 349 | MDRV_CPU_ADD("mn1544", MN1544, ?) |
| r5831 | r5832 | |
| 351 | 355 | MDRV_SCREEN_REFRESH_RATE(50) |
| 352 | 356 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 353 | 357 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 354 | | MDRV_SCREEN_SIZE(256, 192) |
| 355 | | MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 192-1) |
| 358 | MDRV_SCREEN_SIZE(16 + 256 + 16, 16 + 192 + 16) /* border size not accurate */ |
| 359 | MDRV_SCREEN_VISIBLE_AREA(0, 16 + 256 + 16 - 1, 0, 16 + 192 + 16 - 1) |
| 356 | 360 | |
| 357 | 361 | MDRV_GFXDECODE(jr200) |
| 358 | 362 | MDRV_PALETTE_LENGTH(128) |