Previous 15994 Revisions Next

r1869 Sunday 9th March, 2008 at 11:38:04 UTC by Wilbert Pol
[ODYSSEY2] Added support for influencing LUM through P1 bit 7. Fixes bug #1523.
[src/mess/includes]odyssey2.h
[src/mess/machine]odyssey2.c
[src/mess/video]odyssey2.c

src/mess/includes/odyssey2.h
r1868r1869
4040READ8_HANDLER ( odyssey2_t1_r );
4141READ8_HANDLER ( odyssey2_video_r );
4242WRITE8_HANDLER ( odyssey2_video_w );
43WRITE8_HANDLER ( odyssey2_lum_w );
4344
4445void odyssey2_sh_update( void *param,stream_sample_t **inputs, stream_sample_t **_buffer,int length );
4546
src/mess/video/odyssey2.c
r1868r1869
168168static bitmap_t      *tmp_bitmap;
169169static int         start_vpos;
170170static int         start_vblank;
171static UINT8      lum;      /* Output of P1 bit 7 influences the intensity of the background and grid colours */
171172
172173static sound_stream *odyssey2_sh_channel;
173174
r1868r1869
266267    o2_vdc.reg[offset] = data;
267268}
268269
270WRITE8_HANDLER ( odyssey2_lum_w ) {
271   lum = data;
272}
273
269274READ8_HANDLER( odyssey2_t1_r )
270275{
271276   if ( video_screen_get_vpos( 0 ) > start_vpos && video_screen_get_vpos( 0 ) < start_vblank ) {
r1868r1869
298303      rect.min_y = rect.max_y = vpos;
299304      rect.min_x = I824X_START_ACTIVE_SCAN;
300305      rect.max_x = I824X_END_ACTIVE_SCAN - 1;
301      fillbitmap( tmp_bitmap, machine->pens[(o2_vdc.s.color >> 3) & 0x7], &rect );
306      fillbitmap( tmp_bitmap, machine->pens[ ( (o2_vdc.s.color >> 3) & 0x7 ) | ( ( lum << 3 ) ^ 0x08 ) ], &rect );
302307
303308      /* Clear collision map */
304309      memset( collision_map, 0, sizeof( collision_map ) );
305310
306311      /* Display grid if enabled */
307312      if ( o2_vdc.s.control & 0x08 ) {
308         UINT16   color = machine->pens[ ( o2_vdc.s.color & 7 ) | ( ( o2_vdc.s.color >> 3 ) & 0x08 ) ];
313         UINT16   color = machine->pens[ ( o2_vdc.s.color & 7 ) | ( ( ( ( o2_vdc.s.color >> 3 ) & 0x08 ) & ( lum << 3 ) ) ^ 0x08 ) ];
309314         int      x_grid_offset = 8;
310315         int    y_grid_offset = 24;
311316         int      width = 16;
src/mess/machine/odyssey2.c
r1868r1869
139139
140140   odyssey2_switch_banks();
141141
142   odyssey2_lum_w ( 0, p1 >> 7 );
143
142144    logerror("%.6f p1 written %.2x\n", attotime_to_double(timer_get_time()), data);
143145}
144146

Previous 15994 Revisions Next


© 1998-2018 The MESS Team