@@ -220,13 +220,13 @@ void s3virge_vga_device::streams_control_map(address_map &map)
220220 LOGSTREAMS (" MM8180 (Primary Stream Control) %08x & %08x\n " , data, mem_mask);
221221 })
222222 );
223- // map(0x0004, 0x0007) Color/Chroma Key Control (MM8184)
224- // map(0x0010, 0x0013) Secondary Stream Control (MM8190)
225- // map(0x0014, 0x0017) Chroma Key Upper Bound (MM8194)
226- // map(0x0018, 0x001b) Secondary Stream Stretch/Filter Constants (MM8198)
227- // map(0x0020, 0x0023) Blend Control (MM81A0)
228- // map(0x0040, 0x0043) Primary Stream Frame Buffer Address 0 (MM81C0)
229- // map(0x0044, 0x0047) Primary Stream Frame Buffer Address 1 (MM81C4)
223+ // map(0x0004, 0x0007) Color/Chroma Key Control (MM8184)
224+ // map(0x0010, 0x0013) Secondary Stream Control (MM8190)
225+ // map(0x0014, 0x0017) Chroma Key Upper Bound (MM8194)
226+ // map(0x0018, 0x001b) Secondary Stream Stretch/Filter Constants (MM8198)
227+ // map(0x0020, 0x0023) Blend Control (MM81A0)
228+ // map(0x0040, 0x0043) Primary Stream Frame Buffer Address 0 (MM81C0)
229+ // map(0x0044, 0x0047) Primary Stream Frame Buffer Address 1 (MM81C4)
230230 map (0x0048 , 0x004b ).lrw32 (
231231 NAME ([this ] (offs_t offset) {
232232 return (m_streams.primary_stride );
@@ -243,8 +243,11 @@ uint16_t s3virge_vga_device::offset()
243243{
244244 if (s3.ext_misc_ctrl_2 & 0xc )
245245 return m_streams.primary_stride ;
246- // TODO: SDD expects offset x8 with streams disabled
247- return s3trio64_vga_device::offset ();
246+
247+ // NOTE: same as Vision968
248+ if (s3.memory_config & 0x08 )
249+ return vga.crtc .offset << 3 ;
250+ return vga_device::offset ();
248251}
249252
250253void s3virge_vga_device::crtc_map (address_map &map)
@@ -423,12 +426,24 @@ void s3virge_vga_device::s3_define_video_mode()
423426 svga.rgb15_en = 0 ;
424427 svga.rgb16_en = 0 ;
425428 svga.rgb24_en = 0 ;
429+ svga.rgb32_en = 0 ;
426430 switch ((s3.ext_misc_ctrl_2 ) >> 4 )
427431 {
428432 case 0x01 : svga.rgb8_en = 1 ; break ;
429433 case 0x03 : svga.rgb15_en = 1 ; divisor = 2 ; break ;
430434 case 0x05 : svga.rgb16_en = 1 ; divisor = 2 ; break ;
431- case 0x0d : svga.rgb24_en = 1 ; divisor = 1 ; break ;
435+ case 0x0d :
436+ {
437+ // if streams disabled run RAMDAC in unpacked mode
438+ // NOTE: it matches original Vision968 behaviour
439+ // - SDD and Tiny Core Linux relies on this
440+ if (s3.ext_misc_ctrl_2 & 0xc )
441+ svga.rgb24_en = 1 ;
442+ else
443+ svga.rgb32_en = 1 ;
444+ divisor = 1 ;
445+ break ;
446+ }
432447 default : popmessage (" video/s3virge.cpp: video mode not implemented %02x\n " ,((s3.ext_misc_ctrl_2 ) >> 4 ));
433448 }
434449 }
@@ -438,6 +453,7 @@ void s3virge_vga_device::s3_define_video_mode()
438453 svga.rgb15_en = 0 ;
439454 svga.rgb16_en = 0 ;
440455 svga.rgb24_en = 0 ;
456+ svga.rgb32_en = 0 ;
441457 }
442458 if (s3.cr43 & 0x80 ) // Horizontal clock doubling (technically, doubles horizontal CRT parameters)
443459 divisor *= 2 ;
@@ -1307,7 +1323,7 @@ uint32_t s3virge_vga_device::s3d_sub_status_r()
13071323 // check for idle
13081324 res |= (m_s3d_state == S3D_STATE_IDLE) << 13 ;
13091325 // if (m_s3d_state == S3D_STATE_BITBLT && s3virge.s3d.xfer_mode == true && m_xfer_fifo.empty())
1310- // res |= 1 << 13;
1326+ // res |= 1 << 13;
13111327
13121328 // res |= (s3virge.s3d.cmd_fifo_slots_free << 8);
13131329 // NOTE: can actually be 24 FIFO depth with specific Scenic Mode
0 commit comments