XaviX - Improve Monster Truck tile flipping (#4315)

* trying to make more sense of the inline tilemode used in Monster Truck

* update to the ekara Software List XML, filling in some gaps (translations still needed in many cases)

this updates the list from the previous batch with the following titles (volume numbers filled in for many cases)

ekara:ec0002 J-Pop Mix Volume 2 (Japan) (EC0002-JPM)
ekara:ec0008 1979-81 Volume 1 (Japan) (EC0008-G79)
ekara:ec0014 Artist Selection Volume 1 (unknown) (Japan) (EC0014-ATS)
ekara:ec0023 J-Pop Mix Volume 11 (Japan) (EC0023-JPM)
ekara:ec0025 J-Pop Mix Volume 13 (Japan) (EC0025-JPM)
ekara:ec0035 Artist Selection Volume 5 (Matsuda Seiko) (Japan) (EC0035-ATS)
ekara:ec0041 Artist Selection Volume 8 (unknown) (Japan) (EC0041-ATS)
ekara:ec0068 J-Pop Mix Volume 33 (Japan) (EC0068-JPM)
ekara:ec0070 J-Pop Mix Volume 34 (Japan) (EC0070-JPM)
ekara:ec0072 J-Pop Mix Volume 36 (Japan) (EC0072-JPM)
ekara:ec0076 J-Pop Mix Volume 39 (Japan) (EC0076-JPM)
ekara:gc0006 BHT Volume 3 (Japan) (GC0006-BHT)
ekara:mc0001 Mini Volume 1 (Japan) (MC0001-ATM)
ekara:sc0005 SAI Volume 1 (Japan) (SC0005-SAI)
ekara:sc0006 SAI Volume 2 (Japan) (SC0006-SAI)
ekara:sc0009 SAI Volume 3 (Japan) (SC0009-SAI)
ekara:sc0010 HWK (Japan) (SC0010-HKW)
ekara:sc0019 SAI Volume 6 (Japan) (SC0019-SAI)
ekara:sc0021 SAI Volume 7 (Japan) (SC0021-SAI)
ekara:sc0022 SAI Volume 8 (Japan) (SC0022-SAI)
ekara:us_vol3 e-kara US Volume 3 (US-E003)
ekara:us_vol8 e-kara US Volume 8 'No Boys Allowed' (US-E008)
ekara:us_vol9 e-kara US Volume 9 'No Boys Allowed' (US-E009)
ekara:ekaraweb e-kara Web cartridge 28M (Japan)

* typo (nw)

* (nw)

* improve rendering in inline header mode (nw)

* don't think I need this debug code now (nw)

* comment not needed (nw)

* tidy (nw)
This commit is contained in:
David Haywood 2018-11-20 15:33:36 +00:00 committed by ajrhacker
parent 084f7c08a2
commit 87ab2bcee2
3 changed files with 275 additions and 224 deletions

View File

@ -12,174 +12,218 @@
The genres in the Japanese games are represented by the code after the EC number The genres in the Japanese games are represented by the code after the EC number
ECxxxx-JPM = J-Pop Mix ECxxxx-JPM = J-Pop Mix
ECxxxx-ATS = Artist Selection (all songs by a single artist) ECxxxx-ATS = Artist Selection (all songs by a single artist)
ECxxxx-KID = Kid's Mix? (guess) ECxxxx-KID = Kid's Mix
ECxxxx-ENK = unknown ECxxxx-ENK = unknown
ECxxxx-BSC = Graduation Encouragement ECxxxx-BSC = Graduation Encouragement
ECxxxx-G79 = unknown ECxxxx-G79 = 1979-1981 collection
Some Japanese carts have a number starting with BC Some Japanese carts have a number starting with DC (D-x on case)
BCxxxx-BHT = unknown DCxxxx-BHT = unknown (best artists?)
Some Japanese carts have a number starting with GC Some Japanese carts have a number starting with GC (G-x on case)
GCxxxx-BHT = unknown GCxxxx-BHT = unknown (best artists?)
Some Japanese carts have a number starting with SC Some Japanese carts have a number starting with SC (S-x on case)
SCxxxx-SAI = unknown SCxxxx-SAI = unknown
SCxxxx-HKW = unknown SCxxxx-HKW = unknown
(there are more codes, see lists below)
*********************************************************************************** ***********************************************************************************
Japanese cart listing (by EC code) - the EC number is printed on the left side of the cart label, as well as in the serial code Japanese cart listing (by EC code) - the EC number is printed on the left side of the cart label, as well as in the serial code
* = dumped, # = identified, but not dumped. Titles in parenthesis are guessed early carts don't have a number printed on the box, only the title, after a certain point a number was added (when?)
EC0001- (J-Pop Mix Volume 1?) * = dumped
*EC0002- (J-Pop Mix Volume 2?)
*EC0003- J-Pop Mix Volume 3
EC0004-
EC0005-
*EC0006- ENK Volume 1
EC0007-
*EC0008- G79?
EC0009-
*EC0010- Kid's Mix Volume 1 .. EC0001-JPM J-Pop Mix Volume 1
EC0011- .. *EC0002-JPM J-Pop Mix Volume 2
*EC0012- J-Pop Mix Volume 7 .. *EC0003-JPM J-Pop Mix Volume 3
*EC0013- J-Pop Mix Volume 8 .. EC0004-JPM J-Pop Mix Volume 4
*EC0014- Artist Selection Volume 1 - unknown artist .. EC0005-JPM J-Pop Mix Volume 5
*EC0015- Artist Selection Volume 2 - unknown artist .. *EC0006-ENK ENK Volume 1
EC0016- .. EC0007-G76 1976-78 Volume 1
EC0017- .. *EC0008-G79 1979-81 Volume 1
EC0018- .. EC0009- untranslated Volume 1
EC0019-
#EC0020- Kid's Mix Volume 2 .. *EC0010-KID Kid's Mix Volume 1
EC0021- .. EC0011-JPM J-Pop Mix Volume 6
*EC0022- J-Pop Mix Volume 10 .. *EC0012-JPM J-Pop Mix Volume 7
*EC0023- J-Pop Mix Volume 11 .. *EC0013-JPM J-Pop Mix Volume 8
EC0024- (J-Pop Mix Volume 12?) .. *EC0014-ATS Artist Selection Volume 1 - untranslated artist
*EC0025- J-Pop Mix Volume 13 .. *EC0015-ATS Artist Selection Volume 2 - untranslated artist
*EC0026- J-Pop Mix Volume 14 .. EC0016-ENK ENK Volume 2
*EC0027- J-Pop Mix Volume 15 .. EC0017-G73 1973-75 Volume 1
EC0028- .. EC0018-G82 1982-84 Volume 1
*EC0029- Artist Selection Volume 3 - Dreams Come True .. EC0019-BSC Graduation Encouragement Volume 1
EC0030- .. EC0020-KID Kid's Mix Volume 2
*EC0031- Artist Selection Volume 4 - unknown artist .. EC0021-JPM J-Pop Mix Volume 9
EC0032- .. *EC0022-JPM J-Pop Mix Volume 10
EC0033- 23 *EC0023-JPM J-Pop Mix Volume 11
*EC0034- Kid's Mix Volume 3 24 EC0024-JPM J-Pop Mix Volume 12
*EC0035- Artist Selection Volume 5 - Matsuda Seiko 25 *EC0025-JPM J-Pop Mix Volume 13
*EC0036- Artist Selection Volume 6 - KinKi Kids 26 *EC0026-JPM J-Pop Mix Volume 14
EC0037- 27 *EC0027-JPM J-Pop Mix Volume 15
#EC0038- Graduation Encouragement Volume 2 28 EC0028-JPM J-Pop Mix Volume 16
EC0039- 29 *EC0029-ATS Artist Selection Volume 3 - Dreams Come True
EC0040- 30 EC0030-ENK ENK Volume 3
*EC0041- Artist Selection Volume ? - unknown artist 31 *EC0031-ATS Artist Selection Volume 4 - untranslated artist
*EC0042- J-Pop Mix Volume 19 32 EC0032- untranslated Volume 2 (sequel to EC0009)
EC0043- 33 EC0033-JPM J-Pop Mix Volume 17
*EC0044- Artist Selection Volume 9 - Every Little Thing 34 *EC0034-KID Kid's Mix Volume 3
*EC0045- Artist Selection Volume 10 - Mr. Children 35 *EC0035-ATS Artist Selection Volume 5 - Matsuda Seiko
EC0046- 36 *EC0036-ATS Artist Selection Volume 6 - KinKi Kids
EC0047- 37 EC0037-ENK ENK Volume 4
*EC0048- ENK Volume 6 38 EC0038-BSC Graduation Encouragement Volume 2
*EC0049- Artist Selection Volume 11 - Judy and Mary 39 EC0039-ATS Artist Selection Volume 7 - B'z
EC0050- 40 EC0040-JPM J-Pop Mix Volume 18
#EC0051- J-Pop Mix Volume 21 41 *EC0041-ATS Artist Selection Volume 8 - untranslated artist
EC0052- 42 *EC0042-JPM J-Pop Mix Volume 19
EC0053- 43 EC0043-ENK ENK Volume 5
*EC0054- J-Pop Mix Volume 23 44 *EC0044-ATS Artist Selection Volume 9 - Every Little Thing
EC0055 45 *EC0045-ATS Artist Selection Volume 10 - Mr. Children
EC0056- 46 EC0046-JPM J-Pop Mix Volume 20
EC0057- 47 EC0047- untranslated Volume 1
EC0058- 48 *EC0048-ENK ENK Volume 6
EC0059- 49 *EC0049-ATS Artist Selection Volume 11 - Judy and Mary
EC0060- 50 EC0050-ATS Artist Selection Volume 12 - The Beatles
EC0061- 51 EC0051-JPM J-Pop Mix Volume 21
EC0062- 52 EC0052-ENK ENK Volume 7
#EC0063- J-Pop Mix Volume 29 53 EC0053-JPM J-Pop Mix Volume 22
EC0064- 54 *EC0054-JPM J-Pop Mix Volume 23
EC0065 55 EC0055-ATS Artist Selection Volume 13 - Tube
EC0066- 56 EC0056-JPM J-Pop Mix Volume 24
EC0067- 57 EC0057-ATS Artist Selection Volume 14 - SMAP (should be Vol 14? sales sheet still lists 13 tho)
*EC0068- J-Pop Mix Volume ? 58 EC0058-ENK ENK Volume 8
EC0069- 59 EC0059-JPM J-Pop Mix Volume 25
*EC0070- (J-Pop Mix Volume Vol ?) 60 EC0060-JPM J-Pop Mix Volume 26
EC0071- 61 EC0061-JPM J-Pop Mix Volume 27
*EC0072- (J-Pop Mix Volume Vol ?) 62 EC0062-JPM J-Pop Mix Volume 28
EC0073- 63 EC0063-JPM J-Pop Mix Volume 29
EC0074- 64 EC0064-ENK ENK Volume 9
EC0075 65 EC0065-JPM J-Pop Mix Volume 30
*EC0076- (J-Pop Mix Volume Vol ?) 66 EC0066-JPM J-Pop Mix Volume 31
67 EC0067-JPM J-Pop Mix Volume 32
68 *EC0068-JPM J-Pop Mix Volume 33
69 EC0069- untranslated
70 *EC0070-JPM J-Pop Mix Volume 34
71 EC0071-JPM J-Pop Mix Volume 35
72 *EC0072-JPM J-Pop Mix Volume 36
73 EC0073- untranslated volume 1
74 EC0074-JPM J-Pop Mix Volume 37
75 EC0075-JPM J-Pop Mix Volume 38
76 *EC0076-JPM J-Pop Mix Volume 39
77 EC0077-ATS Artist Selection Volume 15 - unknown artist (should be Vol 15? sales sheet lists 5?)
78 EC0078- (unknown)
79 EC0079- (unknown)
80 EC0080- (unknown)
81 EC0081-JPM J-Pop Mix Volume 42
(more? what's the EC highest number?) (more? what's the EC highest number?)
*********************************************************************************** ***********************************************************************************
Japanese cart listing (by GC code) Japanese cart listing (by GC code) (G-x on cartridge / box)
* = dumped, # = identified, but not dumped. Titles in parenthesis are guessed * = dumped
GC0001- G-1 GC0001- (unknown)
*GC0002- BHT Volume 1 G-2 *GC0002-BHT BHT Volume 1
GC0003- G-3 GC0003- (unknown)
GC0004- G-4 GC0004- (unknown)
GC0005- G-5 GC0005- (unknown)
*GC0006- BHT Volume ? G-6 *GC0006-BHT BHT Volume 3
(more? what's the GC highest number?) (more? what's the GC highest number?)
*********************************************************************************** ***********************************************************************************
Japanese cart listing (by MC code) Japanese cart listing (by MC code) (M-x on cartridge / box)
* = dumped, # = identified, but not dumped. Titles in parenthesis are guessed * = dumped
*MC0001- Mini Volume 1 M-1 *MC0001-ATM Mini Volume 1
(more? what's the MC highest number?) (more? what's the MC highest number?)
*********************************************************************************** ***********************************************************************************
Japanese cart listing (by DC code) (the numbering on these doesn't make much sense) Japanese cart listing (by DC code) (D-x on cartridge / box)
* = dumped, # = identified, but not dumped. Titles in parenthesis are guessed (the numbering on these doesn't make much sense are these re-releases?)
* = dumped
#(cartridge marked D-2) DC0002-BAT Best Artist Volume 6 D-2 DC0002-BAT Best Artist Volume 6?
#(cartridge marked D-3) DC0003-BHT Best Artist Volume 9 D-3 DC0003-BHT Best Artist Volume 9?
(more? what's the DC highest number?) (more? what's the DC highest number?)
*********************************************************************************** ***********************************************************************************
Japanese cart listing (by S-* label, SCxxxx- code) Japanese cart listing (by SC code) (S-x on cartridge / box)
#SC0001- Hello Kitty Special TODO: what are the full titles for SAI and HWK
SC0002-
SC0003-
SC0004-
*SC0005- unknown
*SC0006- unknown
SC0007-
SC0008-
*SC0009- unknown
*SC0010- unknown
SC0011-
SC0012-
SC0013-
SC0014-
SC0015-
SC0016-
SC0017-
SC0018-
*SC0019- unknown
SC0020-
*SC0021- unknown
*SC0022- unknown
SC0023-
(not seen above S-23) S-1 SC0001- Hello Kitty Special
S-2 SC0002- (unknown)
S-3 SC0003- (unknown)
S-4 SC0004- (unknown)
S-5 *SC0005-SAI SAI Volume 1
S-6 *SC0006-SAI SAI Volume 2
S-7 SC0007- (unknown)
S-8 SC0008- (unknown)
S-9 *SC0009-SAI SAI Volume 3
S-10 *SC0010-HWK HWK (untranslated)
S-11 SC0011- (unknown)
S-12 SC0012- (unknown)
S-13 SC0013- (unknown)
S-14 SC0014- (unknown)
S-15 SC0015- (unknown)
S-16 SC0016- (unknown)
S-17 SC0017- (unknown)
S-18 SC0018- (unknown)
S-19 *SC0019-SAI SAI Volume 6
S-20 SC0020- (unknown)
S-21 *SC0021-SAI SAI Volume 7
S-22 *SC0022-SAI SAI Volume 8
S-23 SC0023- (unknown)
(more? what's the SC highest number?)
***********************************************************************************
Japanese cart listing (by G code) (for use on multiple devices?)
G-1 untranslated volume 1 (Artist Selection?)
G-2 untranslated volume 1 (B)
G-3 untranslated volume 2 (Artist Selection?)
G-4 untranslated volume 2 (B)
G-5 TV Pop Volume 1
G-6 untranslated volume 3 (B)
G-7 untranslated Volume 3 (Artist Selection?)
G-8 untranslated (no volume)
G-9 TV Pop Volume 3 (Volume 2 is 'P-2' in 'P' series)
G-10 untranslated Volume 4 (Artist Selection?)
G-11 TV Pop Volume 4
G-12 untranslated volume 5 (B) (Volume 4 is 'P-1' in 'P' series)
(more? what's the G highest number?)
***********************************************************************************
Japanese cart listing (by P code) (for use on multiple devices, including DDR)
P-1 untranslated Volume 4 (1,2,3, 5 in G series)
P-2 TV Pop Volume 2 (1,3,4 in G series)
P-3 untranslated Volume 1
P-4 untranslated Volume 7
(more? what's the P highest number?)
***********************************************************************************
--> -->
@ -517,7 +561,7 @@
</software> </software>
<software name="ec0008"> <software name="ec0008">
<description>unknown (Japan) (EC0008-G79)</description> <description>1979-81 Volume 1 (Japan) (EC0008-G79)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -693,7 +737,7 @@
</software> </software>
<software name="ec0041"> <software name="ec0041">
<description>Artist Selection Volume ? (unknown) (Japan) (EC0041-ATS)</description> <!-- volume 7 or 8 --> <description>Artist Selection Volume 8 (unknown) (Japan) (EC0041-ATS)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -770,7 +814,7 @@
</software> </software>
<software name="ec0068"> <software name="ec0068">
<description>J-Pop Mix Volume ? (Japan) (EC0068-JPM)</description> <description>J-Pop Mix Volume 33 (Japan) (EC0068-JPM)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -781,7 +825,7 @@
</software> </software>
<software name="ec0070"> <software name="ec0070">
<description>J-Pop Mix Volume ? (Japan) (EC0070-JPM)</description> <description>J-Pop Mix Volume 34 (Japan) (EC0070-JPM)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -792,7 +836,7 @@
</software> </software>
<software name="ec0072"> <software name="ec0072">
<description>J-Pop Mix Volume ? (Japan) (EC0072-JPM)</description> <description>J-Pop Mix Volume 36 (Japan) (EC0072-JPM)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -803,7 +847,7 @@
</software> </software>
<software name="ec0076"> <software name="ec0076">
<description>J-Pop Mix Volume ? (Japan) (EC0076-JPM)</description> <description>J-Pop Mix Volume 39 (Japan) (EC0076-JPM)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -827,7 +871,7 @@
</software> </software>
<software name="gc0006"> <software name="gc0006">
<description>BHT Volume ? (Japan) (GC0006-BHT)</description> <description>BHT Volume 3 (Japan) (GC0006-BHT)</description>
<year>2000</year> <year>2000</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -855,7 +899,7 @@
<!-- these have unique presentation --> <!-- these have unique presentation -->
<software name="sc0005"> <software name="sc0005">
<description>unknown (Japan) (SC0005-SAI)</description> <description>SAI Volume 1 (Japan) (SC0005-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -866,7 +910,7 @@
</software> </software>
<software name="sc0006"> <software name="sc0006">
<description>unknown (Japan) (SC0006-SAI)</description> <description>SAI Volume 2 (Japan) (SC0006-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -877,7 +921,7 @@
</software> </software>
<software name="sc0009"> <software name="sc0009">
<description>unknown (Japan) (SC0009-SAI)</description> <description>SAI Volume 3 (Japan) (SC0009-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -888,7 +932,7 @@
</software> </software>
<software name="sc0010"> <software name="sc0010">
<description>unknown (Japan) (SC0010-HKW)</description> <description>HWK (Japan) (SC0010-HKW)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -899,7 +943,7 @@
</software> </software>
<software name="sc0019"> <software name="sc0019">
<description>unknown (Japan) (SC0019-SAI)</description> <description>SAI Volume 6 (Japan) (SC0019-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -910,7 +954,7 @@
</software> </software>
<software name="sc0021"> <software name="sc0021">
<description>unknown (Japan) (SC0021-SAI)</description> <description>SAI Volume 7 (Japan) (SC0021-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">
@ -921,7 +965,7 @@
</software> </software>
<software name="sc0022"> <software name="sc0022">
<description>unknown (Japan) (SC0022-SAI)</description> <description>SAI Volume 8 (Japan) (SC0022-SAI)</description>
<year>2001</year> <year>2001</year>
<publisher>Takara</publisher> <publisher>Takara</publisher>
<part name="cart" interface="ekara_cart"> <part name="cart" interface="ekara_cart">

View File

@ -484,6 +484,7 @@ private:
void draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int line); void draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int line);
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int line); void draw_sprites_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int line);
void decode_inline_header(int &flipx, int &flipy, int &test, int& pal, int debug_packets);
bitmap_ind16 m_zbuffer; bitmap_ind16 m_zbuffer;

View File

@ -175,6 +175,78 @@ void xavix_state::draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, cons
} }
} }
void xavix_state::decode_inline_header(int &flipx, int &flipy, int &test, int &pal, int debug_packets)
{
uint8_t byte1 = 0;
int done = 0;
flipx = 0;
flipy = 0;
test = 0;
int first = 1;
do
{
byte1 = get_next_byte();
// only the first byte matters when it comes to setting palette / flips, the rest are just ignored until we reach a 0x6 command, after which there is the tile data
if (first == 1)
{
pal = (byte1 & 0xf0) >> 4;
int cmd = (byte1 & 0x0f);
switch (cmd)
{
// these cases haven't been seen
case 0x0:
case 0x2:
case 0x4:
case 0x8:
case 0xa:
case 0xc:
case 0xe:
// this is just the end command, changes nothing, can be pointed at directly tho
case 0x6:
break;
// flip cases
// does bit 0x02 have a meaning here, we have 2 values for each case
case 0x1:
case 0x3:
flipx = 0; flipy = 0;
break;
case 0x5:
case 0x7:
flipx = 1; flipy = 0;
break;
case 0x9:
case 0xb:
flipx = 0; flipy = 1;
break;
case 0xd:
case 0xf:
flipx = 1; flipy = 1;
break;
}
first = 0;
}
if ((byte1 & 0x0f) == 0x06)
{
// tile data will follow after this, always?
done = 1;
//if (debug_packets) LOG(" (setting palette)");
}
} while (done == 0);
//if (debug_packets) LOG("\n");
}
void xavix_state::draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int line) void xavix_state::draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int line)
{ {
@ -309,7 +381,10 @@ void xavix_state::draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap,
continue; continue;
} }
const int debug_packets = 0; int debug_packets = 1;
//if (line==128) debug_packets = 1;
//else debug_packets = 0;
int test = 0; int test = 0;
if (!alt_tileaddressing) if (!alt_tileaddressing)
@ -350,8 +425,7 @@ void xavix_state::draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap,
{ {
// Addressing Mode 2 (plus Inline Header) // Addressing Mode 2 (plus Inline Header)
if (debug_packets) LOG("for tile %04x (at %d %d): ", tile, (((x * 16) + scrollx) & 0xff), (((y * 16) + scrolly) & 0xff)); //if (debug_packets) LOG("for tile %04x (at %d %d): ", tile, (((x * 16) + scrollx) & 0xff), (((y * 16) + scrolly) & 0xff));
basereg = (tile & 0xf000) >> 12; basereg = (tile & 0xf000) >> 12;
tile &= 0x0fff; tile &= 0x0fff;
@ -360,83 +434,15 @@ void xavix_state::draw_tilemap_line(screen_device &screen, bitmap_ind16 &bitmap,
tile += gfxbase; tile += gfxbase;
set_data_address(tile, 0); set_data_address(tile, 0);
// there seems to be a packet stored before the tile?! decode_inline_header(flipx, flipy, test, pal, debug_packets);
// the offset used for flipped sprites seems to specifically be changed so that it picks up an extra byte which presumably triggers the flipping
uint8_t byte1 = 0;
int done = 0;
int skip = 0;
do
{
byte1 = get_next_byte();
if (debug_packets) LOG(" %02x, ", byte1);
if (skip == 1)
{
skip = 0;
//test = 1;
}
else if ((byte1 & 0x0f) == 0x01)
{
// used
}
else if ((byte1 & 0x0f) == 0x03)
{
// causes next byte to be skipped??
skip = 1;
}
else if ((byte1 & 0x0f) == 0x05)
{
// the upper bits are often 0x00, 0x10, 0x20, 0x30, why?
flipx = 1;
}
else if ((byte1 & 0x0f) == 0x06) // there must be other finish conditions too because sometimes this fails..
{
// tile data will follow after this, always?
pal = (byte1 & 0xf0) >> 4;
done = 1;
}
else if ((byte1 & 0x0f) == 0x07)
{
// causes next byte to be skipped??
skip = 1;
}
else if ((byte1 & 0x0f) == 0x09)
{
// used
}
else if ((byte1 & 0x0f) == 0x0a)
{
// not seen
}
else if ((byte1 & 0x0f) == 0x0b)
{
// used
}
else if ((byte1 & 0x0f) == 0x0c)
{
// not seen
}
else if ((byte1 & 0x0f) == 0x0d)
{
// used
}
else if ((byte1 & 0x0f) == 0x0e)
{
// not seen
}
else if ((byte1 & 0x0f) == 0x0f)
{
// used
}
} while (done == 0);
if (debug_packets) LOG("\n");
tile = get_current_address_byte(); tile = get_current_address_byte();
} }
if (test == 1) pal = machine().rand() & 0xf; if (test == 1)
{
pal = machine().rand() & 0xf;
}
draw_tile_line(screen, bitmap, cliprect, tile, bpp, (x * xtilesize) + scrollx, line, ytilesize, xtilesize, flipx, flipy, pal, zval, yyline); draw_tile_line(screen, bitmap, cliprect, tile, bpp, (x * xtilesize) + scrollx, line, ytilesize, xtilesize, flipx, flipy, pal, zval, yyline);
draw_tile_line(screen, bitmap, cliprect, tile, bpp, ((x * xtilesize) + scrollx) - 256, line, ytilesize, xtilesize, flipx, flipy, pal, zval, yyline); // wrap-x draw_tile_line(screen, bitmap, cliprect, tile, bpp, ((x * xtilesize) + scrollx) - 256, line, ytilesize, xtilesize, flipx, flipy, pal, zval, yyline); // wrap-x