Previous 199869 Revisions Next

r19074 Tuesday 20th November, 2012 at 19:58:56 UTC by Jonathan Gevaryahu
(MESS) Minor fix to the character tile row ordering in apc [Lord Nightmare]
[src/mess/drivers]apc.c

trunk/src/mess/drivers/apc.c
r19073r19074
185185static UPD7220_DRAW_TEXT_LINE( hgdc_draw_text )
186186{
187187   apc_state *state = device->machine().driver_data<apc_state>();
188   int xi,yi;
188   int xi,yi,yi_trans;
189189   int x;
190190   UINT8 char_size;
191191//  UINT8 interlace_on;
r19073r19074
220220
221221      for(yi=0;yi<lr;yi++)
222222      {
223         yi_trans = (yi==0)?lr-1:yi-1;
223224         for(xi=0;xi<8;xi++)
224225         {
225226            int res_x,res_y;
r19073r19074
232233               continue;
233234
234235//              tile_data = secret ? 0 : (state->m_char_rom[tile*char_size+interlace_on*0x800+yi]);
235            tile_data = (state->m_char_rom[(tile & 0x7f)+((tile & 0x80)<<4)+((yi & 0xf)*0x80)+((yi & 0x10)<<8)]);
236            /*
237             Addr bus:   C BA98 7654 3210
238                         | |||| |\\\ \\\\- character number bits 0-6
239                         | |||| \--------- y' bit 0
240                         | |||\----------- y' bit 1
241                         | ||\------------ y' bit 2
242                         | |\------------- y' bit 3
243                         | \-------------- character number bit 7
244                         \---------------- y' bit 4
236245
246            y to y' (assumed; this needs hardware tests since there could be one more 'blank' line between all char rows):
247            y  =  0 1 2 3 ... 16 17 18
248            y' = 18 0 1 2 ... 15 16 17
249
250             Data bus: 76543210 = pixels, in left->01234567->right order
251             */
252            tile_data = (state->m_char_rom[(tile & 0x7f)+((tile & 0x80)<<4)+((yi_trans & 0xf)*0x80)+((yi_trans & 0x10)<<8)]);
253
237254            if(reverse) { tile_data^=0xff; }
238255            if(u_line && yi == lr-1) { tile_data = 0xff; }
239256            if(o_line && yi == 0) { tile_data = 0xff; }

Previous 199869 Revisions Next


© 1997-2024 The MAME Team