trunk/src/mame/drivers/coolridr.c
| r21256 | r21257 | |
| 363 | 363 | #include "machine/am9517a.h" |
| 364 | 364 | #include "rendlay.h" |
| 365 | 365 | |
| 366 | | //#define FAKE_ASCII_ROM |
| 367 | 366 | |
| 368 | 367 | class coolridr_state : public driver_device |
| 369 | 368 | { |
| r21256 | r21257 | |
| 1285 | 1284 | // TODO: Study the CRT test and "Cool Riders" logo for clues. |
| 1286 | 1285 | UINT32 spriteNumber = 0; |
| 1287 | 1286 | |
| 1288 | | // with this bit enabled the tile numbers gets looked up using 'data' (which would be m_blit11) (eg 03f40000 for startup text) |
| 1289 | | // this allows text strings to be written as 8-bit ascii in one area (using command 0x10), and drawn using multi-width sprites |
| 1290 | | if (m_indirect_tile_enable) |
| 1291 | 1287 | { |
| 1292 | | const UINT32 memOffset = data; |
| 1293 | | spriteNumber = space.read_byte(memOffset + h + (v*m_hCellCount)); |
| 1294 | | |
| 1295 | | // DEBUG: For demo purposes, skip &spaces and NULL characters |
| 1296 | | if (spriteNumber == 0x20 || spriteNumber == 0x00) |
| 1297 | | continue; |
| 1298 | | #ifdef FAKE_ASCII_ROM |
| 1299 | | drawgfx_opaque(*drawbitmap,drawbitmap->cliprect(), machine().gfx[3],spriteNumber,0,0,0,pixelOffsetX,pixelOffsetY); |
| 1300 | | continue; |
| 1301 | | #endif |
| 1302 | | } |
| 1303 | | else |
| 1304 | | { |
| 1305 | 1288 | int lookupnum = h + (v*m_hCellCount); |
| 1306 | | |
| 1289 | |
| 1290 | // with this bit enabled the tile numbers gets looked up using 'data' (which would be m_blit11) (eg 03f40000 for startup text) |
| 1291 | // this allows text strings to be written as 8-bit ascii in one area (using command 0x10), and drawn using multi-width sprites |
| 1292 | if (m_indirect_tile_enable) |
| 1293 | { |
| 1294 | const UINT32 memOffset = data; |
| 1295 | lookupnum = space.read_byte(memOffset + h + (v*m_hCellCount)); |
| 1296 | } |
| 1297 | |
| 1298 | |
| 1307 | 1299 | // these should be 'cell numbers' (tile numbers) which look up RLE data? |
| 1308 | 1300 | spriteNumber = get_20bit_data( m_b3romoffset, lookupnum); |
| 1309 | 1301 | |
| r21256 | r21257 | |
| 1813 | 1805 | #endif |
| 1814 | 1806 | |
| 1815 | 1807 | |
| 1816 | | static const gfx_layout fakeascii = |
| 1817 | | { |
| 1818 | | 16,16, |
| 1819 | | 512, |
| 1820 | | 4, |
| 1821 | | { 0,1,2,3 }, |
| 1822 | | { 0*4,0*4,1*4,1*4,2*4,2*4,3*4,3*4,4*4,4*4,5*4,5*4,6*4,6*4, 7*4,7*4 }, |
| 1823 | | { 0*8*4,0*8*4, 1*8*4,1*8*4, 2*8*4,2*8*4, 3*8*4,3*8*4, 4*8*4,4*8*4, 5*8*4,5*8*4, 6*8*4,6*8*4, 7*8*4,7*8*4 }, |
| 1824 | | 8*8*4 |
| 1825 | | }; |
| 1826 | 1808 | |
| 1827 | 1809 | |
| 1828 | 1810 | static GFXDECODE_START( coolridr ) |
| r21256 | r21257 | |
| 1830 | 1812 | GFXDECODE_ENTRY( "gfx_data", 0, tiles16x16_layout, 0, 0x100 ) |
| 1831 | 1813 | GFXDECODE_ENTRY( "gfx5", 0, tiles16x16_layout, 0, 0x100 ) |
| 1832 | 1814 | GFXDECODE_ENTRY( "ram_gfx", 0, tiles16x16_layout, 0, 0x100 ) |
| 1833 | | GFXDECODE_ENTRY( "fakeascii", 0x18000, fakeascii, 0x1000, 16 ) |
| 1834 | 1815 | GFXDECODE_END |
| 1835 | 1816 | |
| 1836 | 1817 | static INPUT_PORTS_START( coolridr ) |
| r21256 | r21257 | |
| 2354 | 2335 | |
| 2355 | 2336 | ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */ |
| 2356 | 2337 | ROM_FILL( 0x000000, 0x80000, 0 ) |
| 2357 | | |
| 2358 | | |
| 2359 | | ROM_REGION( 0x2800000, "fakeascii", ROMREGION_ERASEFF ) |
| 2360 | | #ifdef FAKE_ASCII_ROM |
| 2361 | | ROM_LOAD( "video", 0x000000, 0x020000, CRC(8857ec5a) SHA1(5bed14933af060cb4a1ce6a961c4ca1467a1cbc2) ) // dump of the orunners video ram so we can use the charset (its 8x8 not 16x16 tho, but who cares) |
| 2362 | | #endif |
| 2363 | 2338 | ROM_END |
| 2364 | 2339 | |
| 2365 | 2340 | |