Dreamcast - A Few Interesting Discoveries and Potential Mods

The place for all discussion on gaming hardware
Post Reply
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Dreamcast - A Few Interesting Discoveries and Potential Mods

Post by Link83 »

So this thread is all theoretical, untested, and could just end up being a load of nothing (I dont have access to my Dreamcast for testing at the moment) Its nothing groundbreaking, but I made a few interesting observations I wanted to share with the community with the hope someone might investigate further.

Based on this thread:-
viewtopic.php?f=6&t=65958
I started doing a little more digging into the Dreamcast's DAC chip (AKA "DVE" or "Digital Video Encoder") and came across this document:-
https://segaretro.org/images/7/78/Dream ... ecture.pdf
Which I had never seen before, as it doesn't appear to be included in any of the SDK's I have (Katana 9, Katana 10.1, Katana 11)

So firstly the Dreamcast video system is fairly complex, certainly more complex than it needs to be. This sheet give an overview of how it works:-
Image

To try and break that down:-
-The two mode pins on the AV port are connected directly to the PIO interface on the SH4 CPU. This allows the system to determine which type of video cable is connected to the AV port (Composite/S-Video, RGB SCART, VGA)

-The Dreamcast has 128KB of flash memory which stores the video region (Amongst other things) in a protected memory region, which is configured during production at the factory. However mods can allow us to write to this protected memory and reconfigure the video and software regions:-
http://www.mmmonkey.co.uk/console/sega/dc-region.htm
(If you do this mod make sure to remove the wire afterwards to prevent the protected region of flash memory being accidentally corrupted)

-Based on the video region selected in the flash memory the SH4 outputs high/low signals on three PIO pins referred to as VMODE0/1/2 in the documents, but labelled tvmode0/1/2 in the schematics:-
Image

-The DAC has four mode pins, labelled PAL, PAL-M, PAL-N and DAC on the schematics. The first three pins are connected to VMODE0/1/2 on the SH4:-
Image

This is what allows the 'PAL/NTSC Fix' or 'R422 mod' which forces VMODE0 high and sets the DAC's video mode to PAL:-
http://www.mmmonkey.co.uk/console/sega/dc-ntsc-pal.htm
Although this mod is apparently not recommended as you are basically forcing a PIO pin on the CPU high (Although to me it does kind of look like Sega left the R422, R424, R425 positions unused for exactly this purpose?)

-Somewhat confusingly the image mode settings are passed between the SH4 CPU and the HOLLY GPU, and then passed on again(!) to the AICA sound processor, and then finally to the DAC. This means the DAC is also partially configured by the AICA sound processor:-
Image
According to the chip pin listings the AICA does in fact have all four required VMODE pins:-
Image Image
However according to the schematics only one of these pins is actually used in final retail hardware, VMODE3/aica_tdo:-
Image

It would seem that AICA was originally designed to control all four VMODE pins, but for some reason Sega decided to split them and have three SH4 PIO pins perform 3/4 of the job. Since these pins also double as JTAG pins for the AICA they are still accessible as factory test points on the motherboard (TP301, TP302, TP304) This is further corroborated by the Dreamcast_Hardware_Specification_Outline.pdf document which is likely from an earlier stage in hardware development:-
https://segaretro.org/images/8/8b/Dream ... utline.pdf
This page shows no connection between the SH4 and DVE like the later documents, and instead shows the AICA controlling all four VMODE pins:-
Image

-So here's where it gets interesting, according to the DevBox document linked earlier the one remaining VMODE connection between AICA and DVE is labelled in the block diagram as "RGB/NTSC-PAL selection":-
Image
Since VMODE3 from AICA goes to a pin labelled 'DAC' on the schematics it seems very likely to me that that the VMODE3/aica_tdo/DAC signal is what switches the DAC between standard video output (Composite/S-Video/RF) and RGB (SCART/VGA) and given that the other VMODE pins appear to be simple high/low signals, I would hazard a guess that the same applies to VMODE3 (Later DAC design's are typically configured over I2C, but the Dreamcast design just slightly predates them)

If this is indeed the case then simply lifting pin 46 on the DAC (To prevent damage to AICA) and connecting it to 5V(?) might be enough to permanently fix the systems DAC output to RGB (This of course is just an untested theory, so dont blame me if your Dreamcast gets fried!) It would be great if someone with on oscilloscope could check what signals DAC Pin 46 is receiving in standard and RGB modes, just to confirm this theory.

Why would you want to do this you may ask? Well there are a handful of titles that dont support RGB at all, but using this pin you would have full manual control over RGB output, regardless of what the software officially supports. It is possible to patch ISO's to add RGB support, but this could potentially be a fullproof method that would work with all software, including retail disks.

I think if DAC pin 46 had simply been labelled "RGB" then somebody would have realised its purpose a long time ago, but with it being labelled "DAC" its real function wasn't clear.

TL:DR I may have found a pin on the Dreamcast's DAC which could allow for RGB manual override, bypassing software support requirements.
Last edited by Link83 on Sat Apr 18, 2020 6:54 pm, edited 9 times in total.
User avatar
Link83
Posts: 342
Joined: Tue May 21, 2013 2:39 am

Re: Dreamcast - A Few Interesting Discoveries and Potential

Post by Link83 »

There are also a few other interesting things I noticed...

First its fairly well known that the Dreamcast's VGA output doesn't actually match the VGA specifications. To quote chriz2600's DCHDMI github:-
https://github.com/chriz2600/DreamcastH ... ntation.md
2. Video
The dreamcast is generating 720x480p (not VGA) according to EIA-CEA-861-D "720x480p @59.94/60 Hz (Formats 2 & 3)" (chapter 4.5), not "640x480p @59.94/60 Hz (Format 1)" (chapter 4.2), but uses only 640 pixels of the possible 720.


These links may also be of interest:-
https://www.retrorgb.com/dreamcast.html
http://pms.hazard-city.de/ossc_sampling.jpg
https://rawgit.com/chriz2600/DreamcastH ... video.html

This alteration is already present in the digital video data that the DAC receives, as the DCHDMI had to come up with a workaround:-
viewtopic.php?f=6&t=59339&p=1248481#p1248481

This means that HOLLY is somehow manipulating the image data. However unlike other SDK's such as the GameCube/Wii which have detailed information about this for developers (See the Dolphin/Revolution SDK Video Interface Library (VI.pdf) section "7.1.2 Frame Buffer Size, TV Screen Size, and Position Configuration") I was unable to find anything similar in the Dreamcast's Katana SDK.

Then I noticed page 135 in the DreamcastDevBoxSystemArchitecture.pdf:-
Image
It would seem HOLLY has a "Sync Pulse Generator" or SPG block, which requires certain register values in order to set the screen position and size etc. I'm guessing the default VGA register values were somehow selected incorrectly by Sega (Similar to the Wii 480p issue) and unlike other console manufacturers it doesn't look like Sega gave developers the option to change these default register values.

With a bit of tinkering I imagine somebody more skilled that me could come up with some hacks that would fix the VGA output register values. I guess this could only be applied using Gameshark codes or patched ISO's (Much like the widescreen hacks) Although I do wonder if perhaps a BIOS hack could force a fix to apply to all software? However keep in mind that any adjustments to the default values would likely cause problems for the DCHDMI.

-----

I also noticed that the VMODE0-2 pins dont just configure the video region (NTSC, PAL, PAL-M, PAL-N) They can apparently also be used to 'force' interlaced output:-
Image
In addition, since there are three VMODE pins that potentially allows for eight possible configurations, but only six are listed in the above chart. I guess its theoretically possible the two missing configurations (0-1-0 and 1-0-0) allow for undocumented options? Perhaps "Forced NTSC Progressive" and "Forced PAL Progressive" options? Of course the page does also state "Operation is not guaranteed for any combinations of pin settings that are not shown above"

-----

Finally another tidbit of information which is rarely mentioned is that the Dreamcast DAC is manufactured by ROHM and the actual ROHM part number is BU1426KS, which was then rebranded with a Sega part number (As is typical for Sega) In addition there are two revisions of the chip:-
'SEGA 315-6145' [VA0, Early VA1] ROHM BU1426KS
'SEGA 315-6258' [Later VA1, VA2.1] ROHM (Actual part number unknown)
Image
Both revisions appear to be pin compatible so its not entirely clear what changed (If anything) It might just have been a process/manufacturing change, but if anyone has both revisions and the necessary equipment a video capture comparison of the two revisions could be interesting?

Anyway, if you have read all of the above I hope you found at least some part of it interesting/useful! :)
Last edited by Link83 on Sun Apr 19, 2020 3:31 pm, edited 4 times in total.
fernan1234
Posts: 2181
Joined: Mon Aug 14, 2017 8:34 pm

Re: Dreamcast - A Few Interesting Discoveries and Potential

Post by fernan1234 »

Link83 wrote:Why would you want to do this you may ask? Well there are a handful of titles that dont support RGB at all, but using this pin you would have full manual control over RGB output, regardless of what the software officially supports. It is possible to patch ISO's to add RGB support, but this could potentially be a fullproof method that would work with all software, including retail disks.
This would be pretty interesting. There are a few games that support S-video and composite only, and a couple that do s-video, composite, and "VGA" but skip RGB (15khz RGBHV), like the non-PAL versions of Skies of Arcadia.

For people that cab't or don't like defaulting everything to VGA, this would be a great resource.
User avatar
maxtherabbit
Posts: 1763
Joined: Mon Mar 05, 2018 4:03 pm

Re: Dreamcast - A Few Interesting Discoveries and Potential

Post by maxtherabbit »

tag!
Post Reply