trunk/src/mess/drivers/casloopy.c
| r21618 | r21619 | |
| 158 | 158 | public: |
| 159 | 159 | casloopy_state(const machine_config &mconfig, device_type type, const char *tag) |
| 160 | 160 | : driver_device(mconfig, type, tag) , |
| 161 | | m_bios_rom(*this, "bios_rom"){ } |
| 161 | m_bios_rom(*this, "bios_rom"), |
| 162 | m_vregs(*this, "vregs") |
| 163 | { } |
| 162 | 164 | |
| 163 | 165 | required_shared_ptr<UINT32> m_bios_rom; |
| 166 | required_shared_ptr<UINT32> m_vregs; |
| 164 | 167 | UINT16 *m_paletteram; |
| 165 | 168 | UINT8 *m_vram; |
| 166 | 169 | UINT8 *m_bitmap_vram; |
| r21618 | r21619 | |
| 228 | 231 | int x,y; |
| 229 | 232 | int count; |
| 230 | 233 | |
| 231 | | count = 0; |
| 234 | static int test; |
| 232 | 235 | |
| 236 | if(machine().input().code_pressed(KEYCODE_Z)) |
| 237 | test+=0x100; |
| 238 | |
| 239 | if(machine().input().code_pressed(KEYCODE_X)) |
| 240 | test-=0x100; |
| 241 | |
| 242 | popmessage("%08x",test); |
| 243 | |
| 244 | #if 0 |
| 245 | int r,g,b; |
| 246 | |
| 247 | r = pal5bit((m_vregs[0x4/4] >> 10) & 0x1f); |
| 248 | g = pal5bit((m_vregs[0x4/4] >> 5) & 0x1f); |
| 249 | b = pal5bit((m_vregs[0x4/4] >> 0) & 0x1f); |
| 250 | palette_set_color(machine(),0x100,MAKE_RGB(r^0xff,g^0xff,b^0xff)); |
| 251 | bitmap.fill( 0x100 ,cliprect); |
| 252 | #endif |
| 253 | |
| 254 | count = test; |
| 233 | 255 | for (y=0;y<32;y++) |
| 234 | 256 | { |
| 235 | 257 | for (x=0;x<32;x++) |
| r21618 | r21619 | |
| 238 | 260 | |
| 239 | 261 | tile &= 0x3ff; //??? |
| 240 | 262 | |
| 241 | | drawgfx_opaque(bitmap,cliprect,gfx,tile,7,0,0,x*8,y*8); |
| 263 | drawgfx_transpen(bitmap,cliprect,gfx,tile,7,0,0,x*8,y*8,-1); |
| 242 | 264 | |
| 243 | 265 | count+=2; |
| 244 | 266 | } |
| 245 | 267 | } |
| 246 | 268 | |
| 247 | | static int test; |
| 248 | | |
| 249 | | if(machine().input().code_pressed(KEYCODE_Z)) |
| 250 | | test+=0x100; |
| 251 | | |
| 252 | | if(machine().input().code_pressed(KEYCODE_X)) |
| 253 | | test-=0x100; |
| 254 | | |
| 255 | | popmessage("%08x",test); |
| 256 | | |
| 257 | 269 | count = test; |
| 258 | 270 | |
| 259 | 271 | for (y=cliprect.min_y;y<cliprect.max_y;y++) |
| r21618 | r21619 | |
| 360 | 372 | size = (sh7021_regs[0x7a/2]&0xffff); |
| 361 | 373 | type = (sh7021_regs[0x7e/2]&0xffff); |
| 362 | 374 | |
| 363 | | printf("%08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type); |
| 375 | printf("3 %08x %08x %04x %04x\n",src & 0x7ffffff,dst & 0x7ffffff,size,type); |
| 364 | 376 | |
| 365 | 377 | sh7021_regs[0x7e/2]&=0xfffe; |
| 366 | 378 | } |
| r21618 | r21619 | |
| 383 | 395 | AM_RANGE(0x01000000, 0x0107ffff) AM_RAM AM_SHARE("wram")// stack pointer points here |
| 384 | 396 | AM_RANGE(0x04000000, 0x0401ffff) AM_READWRITE8(casloopy_bitmap_r,casloopy_bitmap_w,0xffffffff) |
| 385 | 397 | AM_RANGE(0x04040000, 0x0404ffff) AM_READWRITE8(casloopy_vram_r,casloopy_vram_w,0xffffffff) // tilemap + PCG |
| 386 | | AM_RANGE(0x04051000, 0x040510ff) AM_READWRITE16(casloopy_pal_r,casloopy_pal_w,0xffffffff) |
| 398 | AM_RANGE(0x04050000, 0x040503ff) AM_RAM // ??? |
| 399 | AM_RANGE(0x04051000, 0x040511ff) AM_READWRITE16(casloopy_pal_r,casloopy_pal_w,0xffffffff) |
| 387 | 400 | AM_RANGE(0x04058000, 0x04058007) AM_READWRITE16(casloopy_vregs_r,casloopy_vregs_w,0xffffffff) |
| 388 | | AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM // RGB brightness plus scrolling |
| 401 | AM_RANGE(0x0405b000, 0x0405b00f) AM_RAM AM_SHARE("vregs") // RGB555 brightness control plus scrolling |
| 389 | 402 | AM_RANGE(0x05ffff00, 0x05ffffff) AM_READWRITE16(sh7021_r,sh7021_w,0xffffffff) |
| 390 | 403 | // AM_RANGE(0x05ffff00, 0x05ffffff) - SH7021 internal i/o |
| 391 | 404 | AM_RANGE(0x06000000, 0x061fffff) AM_ROM AM_REGION("rom_cart",0) |
| r21618 | r21619 | |
| 428 | 441 | |
| 429 | 442 | } |
| 430 | 443 | |
| 444 | |
| 445 | static const gfx_layout casloopy_4bpp_layoutROM = |
| 446 | { |
| 447 | 8,8, |
| 448 | RGN_FRAC(1,1), |
| 449 | 4, |
| 450 | { STEP4(0, 1) }, |
| 451 | { STEP8(0, 4) }, |
| 452 | { STEP8(0, 4*8) }, |
| 453 | 4*8*8 |
| 454 | }; |
| 455 | |
| 456 | static const gfx_layout casloopy_8bpp_layoutROM = |
| 457 | { |
| 458 | 8,8, |
| 459 | RGN_FRAC(1,1), |
| 460 | 8, |
| 461 | { STEP8(0, 1) }, |
| 462 | { STEP8(0, 8) }, |
| 463 | { STEP8(0, 8*8) }, |
| 464 | 8*8*8 |
| 465 | }; |
| 466 | |
| 467 | |
| 468 | |
| 469 | |
| 431 | 470 | static MACHINE_CONFIG_START( casloopy, casloopy_state ) |
| 432 | 471 | |
| 433 | 472 | /* basic machine hardware */ |