trunk/src/mame/drivers/coolridr.c
| r21252 | r21253 | |
| 451 | 451 | |
| 452 | 452 | UINT8* m_compressedgfx; |
| 453 | 453 | UINT32 get_20bit_data(UINT32 romoffset, int _20bitwordnum); |
| 454 | UINT16 get_10bit_data(UINT32 romoffset, int _10bitwordnum); |
| 454 | 455 | |
| 455 | 456 | DECLARE_READ32_MEMBER(sysh1_sound_dma_r); |
| 456 | 457 | DECLARE_WRITE32_MEMBER(sysh1_sound_dma_w); |
| r21252 | r21253 | |
| 659 | 660 | |
| 660 | 661 | } |
| 661 | 662 | |
| 663 | UINT16 coolridr_state::get_10bit_data(UINT32 romoffset, int _10bitwordnum) |
| 664 | { |
| 665 | UINT32 data = get_20bit_data(romoffset, _10bitwordnum>>1); |
| 666 | if (_10bitwordnum&1) return data & 0x3ff; |
| 667 | else return (data>>10) & 0x3ff; |
| 668 | } |
| 669 | |
| 662 | 670 | /* This is a RLE-based sprite blitter (US Patent #6,141,122), very unusual from Sega... */ |
| 663 | 671 | WRITE32_MEMBER(coolridr_state::sysh1_txt_blit_w) |
| 664 | 672 | { |
| r21252 | r21253 | |
| 1149 | 1157 | c838a e4372 e0f43 d0f0e d2369 ce6dd da741 d07a7 c3b3c cf35c cf383 cf322 d2348 b7739 c8339 d0711 |
| 1150 | 1158 | */ |
| 1151 | 1159 | |
| 1160 | |
| 1161 | /* |
| 1162 | investigate this sprite |
| 1163 | (much wider, all columns the same) |
| 1164 | 00200 (00016590,0) 00200 (00016590,0) |
| 1165 | 00210 (00016592,0) 00210 (00016592,0) |
| 1166 | 00251 (0001659a,1) 00251 (0001659a,1) |
| 1167 | 00292 (000165a2,2) 00292 (000165a2,2) |
| 1168 | 002b7 (000165a6,7) 002b7 (000165a6,7) |
| 1169 | 002c4 (000165a8,4) 002c4 (000165a8,4) |
| 1170 | 002f4 (000165ae,4) 002f4 (000165ae,4) |
| 1171 | 00335 (000165b6,5) 00335 (000165b6,5) |
| 1172 | 00373 (000165be,3) 00373 (000165be,3) |
| 1173 | 0038a (000165c1,2) 0038a (000165c1,2) |
| 1174 | 003ac (000165c5,4) 003ac (000165c5,4) |
| 1175 | 003bd (000165c7,5) 003bd (000165c7,5) |
| 1176 | 003fe (000165cf,6) 003fe (000165cf,6) |
| 1177 | 00419 (000165d3,1) 00419 (000165d3,1) |
| 1178 | 0045a (000165db,2) 0045a (000165db,2) |
| 1179 | 0049b (000165e3,3) 0049b (000165e3,3) |
| 1180 | 004b2 (000165e6,2) 004b2 (000165e6,2) |
| 1181 | |
| 1182 | */ |
| 1183 | |
| 1152 | 1184 | #if 0 |
| 1153 | 1185 | // logging only |
| 1154 | 1186 | if (!m_indirect_tile_enable) |
| 1155 | 1187 | { |
| 1156 | | if (m_hCellCount==0x10) |
| 1188 | //if (m_hCellCount==0x10) |
| 1157 | 1189 | { |
| 1158 | 1190 | for (int v = 0; v < m_vCellCount/*+16*/; v++) |
| 1159 | 1191 | { |
| r21252 | r21253 | |
| 1162 | 1194 | int lookupnum = h + (v*m_hCellCount); |
| 1163 | 1195 | UINT32 spriteNumber = get_20bit_data( m_b3romoffset, lookupnum); |
| 1164 | 1196 | |
| 1165 | | |
| 1197 | #if 0 |
| 1166 | 1198 | printf("%05x (%08x,%d) ",spriteNumber, (m_b3romoffset + (spriteNumber>>3)), spriteNumber&7 ); |
| 1167 | 1199 | |
| 1168 | 1200 | |
| r21252 | r21253 | |
| 1171 | 1203 | |
| 1172 | 1204 | if ((h == m_hCellCount-1) && (v == m_vCellCount-1)) |
| 1173 | 1205 | printf("\n"); |
| 1206 | #endif |
| 1207 | #if 1 |
| 1208 | int compdataoffset = (m_b3romoffset + (spriteNumber>>3)); |
| 1209 | // do some logging for the sprite mentioned above 'investigate this sprite' looking at compressed data used in the first column |
| 1210 | //if ((compdataoffset==0x3e9030) && (h==0)) |
| 1211 | if ((compdataoffset >= 0x016590) && (compdataoffset<=0x0165e6) && (h==0)) |
| 1212 | { |
| 1213 | printf("%05x (%08x,%d) | ",spriteNumber, compdataoffset, spriteNumber&7 ); |
| 1214 | |
| 1215 | |
| 1216 | //00200 (00016590,0) 00200 (00016590,0) |
| 1217 | //00210 (00016592,0) 00210 (00016592,0) |
| 1218 | |
| 1219 | for (int i=0;i<18;i++) |
| 1220 | { |
| 1221 | UINT16 compdata = get_10bit_data( m_b3romoffset, spriteNumber + i); |
| 1222 | printf("%03x ", compdata); |
| 1223 | |
| 1224 | // as 20-bit |
| 1225 | // 00200 (00016590,0) | 03c3e 0f83e 0f83e 0f83e 95e57 95e57 95e57 95e57 (03e57) |
| 1226 | // 00210 (00016592,0) | 03e57 95e57 95e07 81e07 81e07 81e07 81e07 81e07 81e07 |
| 1227 | |
| 1228 | // as 10-bit (pretty, I like this) |
| 1229 | /* |this is where 210 starts |
| 1230 | 00200 (00016590,0) | 00f 03e 03e 03e 03e 03e 03e 03e 257 257 257 257 257 257 257 257(00f 257) |
| 1231 | 00210 (00016592,0) | 00f 257 257 257 257 207 207 207 207 207 207 207 207 207 207 207 207 207 |
| 1232 | 00251 (0001659a,1) | 00f 237 237 237 237 237 237 237 237 237 237 237 237 22f 22f 22f 22f 22f |
| 1233 | 00292 (000165a2,2) | 00f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f 21f |
| 1234 | 002b7 (000165a6,7) | 00f 0be 0be 0be 263 263 263 263 07e 07e 07e 07e 05e 00f 07e 07e 05e 247 |
| 1235 | 002c4 (000165a8,4) | 00f 07e 07e 05e 247 247 247 247 247 247 247 247 247 247 247 247 20f 20f |
| 1236 | 002f4 (000165ae,4) | 00f 20f 20f 20f 20f 20f 20f 20f 20f 20f 20f 20f 20f 233 233 233 233 233 |
| 1237 | 00335 (000165b6,5) | 00f 23b 23b 23b 23b 20b 20b 20b 20b 20b 20b 20b 20b 20b 20b 20b 20b 20b |
| 1238 | 00373 (000165be,3) | 00f 0fe 0fe 0fe 0fe 0fe 0fe 223 223 223 223 223 223 223 223 223 223 223 |
| 1239 | 0038a (000165c1,2) | 00f 223 223 223 223 223 223 223 223 223 223 223 223 223 223 223 223 223 |
| 1240 | 003ac (000165c5,4) | 00f 17e 15e 1be 1be 1be 1be 1be 19e 217 217 217 217 217 217 217 217 00f |
| 1241 | 003bd (000165c7,5) | 00f 217 217 217 217 217 217 217 217 217 217 217 217 217 217 217 217 217 |
| 1242 | 003fe (000165cf,6) | 00f 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b 22b |
| 1243 | 00419 (000165d3,1) | 00f 203 203 203 203 203 203 203 203 203 203 203 203 203 203 203 203 203 |
| 1244 | 0045a (000165db,2) | 00f 227 227 227 227 227 227 227 227 227 227 227 227 227 227 227 227 253 |
| 1245 | 0049b (000165e3,3) | 00f 213 213 213 213 213 213 213 213 13e 13e 13e 13e 13e 13e 21b 21b 21b |
| 1246 | 004b2 (000165e6,2) | 000 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b 21b |
| 1247 | */ |
| 1248 | } |
| 1249 | printf("\n"); |
| 1250 | } |
| 1251 | #endif |
| 1252 | |
| 1174 | 1253 | } |
| 1175 | 1254 | } |
| 1176 | 1255 | } |