Previous 199869 Revisions Next

r21257 Thursday 21st February, 2013 at 06:52:38 UTC by David Haywood
kill fake ASCII rom, you can read the text now even if it's not perfect
[src/mame/drivers]coolridr.c

trunk/src/mame/drivers/coolridr.c
r21256r21257
363363#include "machine/am9517a.h"
364364#include "rendlay.h"
365365
366//#define FAKE_ASCII_ROM
367366
368367class coolridr_state : public driver_device
369368{
r21256r21257
12851284                        // TODO: Study the CRT test and "Cool Riders" logo for clues.
12861285                        UINT32 spriteNumber = 0;
12871286
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)
12911287                        {
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                        {
13051288                           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
13071299                           // these should be 'cell numbers' (tile numbers) which look up RLE data?
13081300                           spriteNumber = get_20bit_data( m_b3romoffset, lookupnum);     
13091301
r21256r21257
18131805#endif
18141806
18151807
1816static 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};
18261808
18271809
18281810static GFXDECODE_START( coolridr )
r21256r21257
18301812   GFXDECODE_ENTRY( "gfx_data", 0, tiles16x16_layout, 0, 0x100 )
18311813   GFXDECODE_ENTRY( "gfx5", 0, tiles16x16_layout, 0, 0x100 )
18321814   GFXDECODE_ENTRY( "ram_gfx", 0, tiles16x16_layout, 0, 0x100 )
1833   GFXDECODE_ENTRY( "fakeascii", 0x18000, fakeascii, 0x1000, 16 )
18341815GFXDECODE_END
18351816
18361817static INPUT_PORTS_START( coolridr )
r21256r21257
23542335
23552336   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
23562337   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
23632338ROM_END
23642339
23652340

Previous 199869 Revisions Next


© 1997-2024 The MAME Team