Deinterlaced Mushi PS2 (and Ibara)

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Deinterlaced Mushi PS2 (and Ibara)

Post by ReKleSS »

So, I got bored and decided to find out if this was actually feasible. I've managed to do it, but it achieves nothing of interest. If I could fix the filtering I might be onto something, but that will take 100x more work. It's >30 degrees C here and the cooler is broken, so I'd rather drink beer and play games.

Whether or not the display is interlaced is controlled by the CRTC (CRT controller). It is initialized by the running program. It's possible to patch the program so it will make the CRTC to run in deinterlaced mode. This is what I've done.

I was hoping the deinterlaced display would at least fix the weirdness you get when scrolling horizontally (in tate mode - moving along the screen's short axis) - scrolling left and scrolling right feel very different. Unfortunately, it didn't work. The deinterlacing seems to cause it to alternate between the even and odd lines of the image, so the image distorts somewhat as it scrolls. It's only really noticable in the background in either video mode. It fixed that particular problem, but introduced another equally bad one.

Anyway, the patch:
Change:

Code: Select all

01 00 24 32 ff 00 45 32
to

Code: Select all

00 00 04 20 ff 00 45 32
and

Code: Select all

01 00 24 32 04 00 06 a6
to

Code: Select all

00 00 04 20 04 00 06 a6
I leave the actual method of patching to you, as I can't think of any that don't involve copyright infringement. It might be possible with some sort of cheat device, but I can't find anything on how to create the codes. It's not the sort you're likely to go to hell for, but it's still illegal. Again, in the end this doesn't do anything useful unless you have a fetish for scanlines. It doesn't make the game any more fun to play.

(The code is MIPS machine code, if you're interested. If you want to see how it actually works read Dreamtime's PS2 programming tutorials and mess around with the code. Knowing MIPS assembly will help immensely.)

[EDIT]
The same strings work on Ibara. The results are somewhat better. The lack of interlacing seems to make the filtering more apparent.
Last edited by ReKleSS on Fri Dec 28, 2007 11:17 pm, edited 1 time in total.
弾もまたいで通る
User avatar
GaijinPunch
Posts: 15646
Joined: Mon Jan 31, 2005 11:22 pm
Location: San Fransicso

Post by GaijinPunch »

So I assume you patch this and play a copy on a PS2? That's interesting that you pulled it off. Too bad it didn't have the effects one would want. I wonder what really entails making a game compatible in both interlaced and deinterlaced modes.
RegalSin wrote:New PowerPuff Girls. They all have evil pornstart eyelashes.
User avatar
D
Posts: 3743
Joined: Tue Feb 01, 2005 3:49 pm
Location: Almere, Netherlands
Contact:

Post by D »

I think it is great that you at least tried it.
Better luck next time
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Post by ReKleSS »

GaijinPunch wrote:So I assume you patch this and play a copy on a PS2? That's interesting that you pulled it off. Too bad it didn't have the effects one would want. I wonder what really entails making a game compatible in both interlaced and deinterlaced modes.
If you interlace something with sharp lines you get annoying flickering, because those sharp lines disappear or change every sceond frame. The effect is most obvious comparing, say, the wii browser to the X background or some warez intros. If you want a good interlaced/deinterlaced display you need a suitable filter to go with it.

The other possible complication is the way the image gets to the display. I suspected the CRTC would pull the data from only the top half of the framebuffer - I was surprised when it displayed properly, taking only alternate lines. There's another CRTC setting that controls that, and I didn't touch it.
弾もまたいで通る
AVT
Posts: 26
Joined: Wed Sep 28, 2005 10:21 pm

Post by AVT »

Well, I desperately need to change some games into interlace mode. Is there are easy way to do it? I want to change video mode in some emulators for PS2: Snes station, PGen and NeoGeoCD. And there is several games, which kills my eyes - Disgaea 1-2, Dodonpachi DOJ (arcade mode), ICO.

ReKleSS, please, help me. I have big problems with deinterlaced videomode, it gives headache to me. Developing the patches for abandoned freeware console emulators doesn't involve copyright infringement, i think.
User avatar
Strider77
Posts: 4716
Joined: Thu Jul 27, 2006 7:01 am

Post by Strider77 »

there are video processoers you cane use to deinterlace mame ect. i have 2 of em, pretty cheap if you find one on ebat ect. i payed no more than 60.oo

it has vga in and rgb/component out. the extron emotia series. it has a *240p* mode on it.
Damn Tim, you know there are quite a few Americans out there who still lives in tents due to this shitty economy, and you're dropping loads on a single game which only last 20 min. Do you think it's fair? How much did you spend this time?
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Post by ReKleSS »

AVT wrote:Well, I desperately need to change some games into interlace mode. Is there are easy way to do it? I want to change video mode in some emulators for PS2: Snes station, PGen and NeoGeoCD. And there is several games, which kills my eyes - Disgaea 1-2, Dodonpachi DOJ (arcade mode), ICO.

ReKleSS, please, help me. I have big problems with deinterlaced videomode, it gives headache to me. Developing the patches for abandoned freeware console emulators doesn't involve copyright infringement, i think.
If the sources are available it shouldn't be too bad... otherwise I don't really want to. Just get an xbox for those things. Converting games into interlaced mode is a problem - the framebuffer is most likely only 240 lines, so there's nowhere to get the missing detail from. If lack of interlacing is giving you a headache you probably need a better TV.

Strider77: I don't think any drivers in mame output interlaced video... anyway, that's all postprocessing stuff. It's taking the two half-frames, interpolating it and dropping half the lines. What's the point?

On another note, there's a product, the Xploder HDTV that sounds like it forces the PS2 to output 480p. Since Mushi and Ibara appear to be rendering to a full-height framebuffer I imagine this should have decent results. Anyone tried it?
弾もまたいで通る
User avatar
GaijinPunch
Posts: 15646
Joined: Mon Jan 31, 2005 11:22 pm
Location: San Fransicso

Post by GaijinPunch »

TATE games played in Yoko will be interlaced (on an AVGA).
RegalSin wrote:New PowerPuff Girls. They all have evil pornstart eyelashes.
User avatar
it290
Posts: 2542
Joined: Thu Mar 17, 2005 1:00 am
Location: polar malortex, illinois

Post by it290 »

The Emotia series take VGA video and convert it to 480i OR 240p, that is they deinterlace after interlacing the video. ;) It actually works really well with MAME if you fix your output to 640x480 without using any type of filtering, as it's just throwing away extra lines. It's not as good as running MAME in true low res on a real monitor, but it comes close. Also, you can get AdvanceMAME (and probably a few other builds) to output interlaced video, which is useful if you have, say, a 15khz monitor and you want to run Asteroids on it.

I tried using the Emoita on Mushi and Ibara -- you have to use an upscan converter on the video first to convert it to VGA -- and the results were better than just running them normally, but still didn't look great thanks to the filtering. Probably looks slightly worse than patching the game. I tried a few other 2d games as well: Metal Slug Anthology and Street Figher Alpha Anthology looked terrible, whereas Capcom Classics Collection looked pretty damn good (except for some of the older games like Black Tiger, which for some reason use heavier filtering than the rest of the pack).
Image
We here shall not rest until we have made a drawing-room of your shaft, and if you do not all finally go down to your doom in patent-leather shoes, then you shall not go at all.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Re: Deinterlaced Mushi PS2 (and Ibara)

Post by antron »

Here are PPF patches for Ibara and Mushi
free registration required:
http://www.eurasia.nu/modules.php?name= ... nterlacers

ReKleSS wrote: [EDIT]
The same strings work on Ibara. The results are somewhat better. The lack of interlacing seems to make the filtering more apparent.
for Ibara, all I see is improvement with this hack. nice work. a diagonal line is a diagonal line, not a saw tooth like the retail. less flicker too. did you ever try it on Raiden III? it's a no-go with Gradius V.

i took some pictures, what's a good place to post them, anyone?
Last edited by antron on Sun Aug 30, 2009 3:55 am, edited 2 times in total.
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Post by ReKleSS »

I use imageshack.us , there's also photobucket.com and a few others. I tried getting photos of mushi, but I couldn't get them to come out right... come to think of it, I should probably have been using 1/30, not 1/60.

Edit: OK, got some 1/30 (2 frames) pictures from Mushi.
Title screen, before:
Image

Title screen, after:
Image

Level 1, before:
Image

Level 1, after:
Image

Those second two shots didn't turn out to well, reco's moving horizontally in the first and vertically in the second. Look at the background instead.
弾もまたいで通る
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Post by Fudoh »

Slightly OT, but nevertheless: have you ever fooled around with the HDTV Exploder bootdisc ? Aleanil was able to run Mushihimesama with it, which I never could and I'm still wondering what I did wrong.

Here are the threads:
http://shmups.system11.org/viewtopic.ph ... light=hdtv

http://shmups.system11.org/viewtopic.ph ... light=hdtv
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

from the Ibara pause screen. you can see this throughout the game, pun not intended ;) This is Tate with RGB.

Image

Image
Last edited by antron on Wed Feb 20, 2008 2:52 pm, edited 1 time in total.
User avatar
P_HAT
Posts: 1954
Joined: Mon Mar 12, 2007 10:52 am
Location: Ukraine; Yalta
Contact:

Post by P_HAT »

Guys, we need tutorial >_>
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

P_HAT wrote:Guys, we need tutorial >_>
I just ripped the disc to an ISO file on my PC.
Opened the ISO with a hex editor.
Used find and replace function for the two strings.
Saved changes.
Burned new ISO.

I can make a PPF patch file that can be more easily applied.


ReKleSS, are your pictures Yoko or Tate, Composite or RGB?
User avatar
D
Posts: 3743
Joined: Tue Feb 01, 2005 3:49 pm
Location: Almere, Netherlands
Contact:

Post by D »

Wow, the difference is great.
This is awesome news!
So now we can make bad ports better? Awesome!
Keep up the great work. The pictures were excellent and I could see a huge difference. I can imagine how much of a difference it will make when playing!
Fudoh wrote:Slightly OT, but nevertheless: have you ever fooled around with the HDTV Exploder bootdisc ? Aleanil was able to run Mushihimesama with it, which I never could and I'm still wondering what I did wrong.

Here are the threads:
http://shmups.system11.org/viewtopic.ph ... light=hdtv

http://shmups.system11.org/viewtopic.ph ... light=hdtv
Yeah, wondering about that too and the matrix modchip and stuff. Some is explained, but I'm a bit confused.
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

D wrote:
Fudoh wrote:Slightly OT, but nevertheless: have you ever fooled around with the HDTV Exploder bootdisc ? Aleanil was able to run Mushihimesama with it, which I never could and I'm still wondering what I did wrong.

Here are the threads:
http://shmups.system11.org/viewtopic.ph ... light=hdtv

http://shmups.system11.org/viewtopic.ph ... light=hdtv
Yeah, wondering about that too and the matrix modchip and stuff. Some is explained, but I'm a bit confused.
I think that stuff is for VGA, right?
Last edited by antron on Wed Feb 20, 2008 3:46 pm, edited 1 time in total.
User avatar
D
Posts: 3743
Joined: Tue Feb 01, 2005 3:49 pm
Location: Almere, Netherlands
Contact:

Post by D »

antron wrote:I think that stuff is for VGA, right?
Yeah you are right. Sorry for casuing confusion. I'm just very excited about all of these non-standard ways to have a better gaming experience/better pq quality! A site should be made with alll of these techniques/ways to do these things.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Post by Fudoh »

It would be interesting nevertheless to use both since the usual deinterlacers have quite a hard time with these two Taito conversions.

@antron

the Hexteditor I use can't handle the Ibara iso (too large). Can you tell me which Hex editing tool you've used ?
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

Fudoh wrote: @antron

the Hexteditor I use can't handle the Ibara iso (too large). Can you tell me which Hex editing tool you've used ?
one of the free ones with Ubuntu, KHexEdit
I was quite shocked that it could handle it.

WinHex will do it, but the free trial version might not.
User avatar
Fudoh
Posts: 13015
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Post by Fudoh »

Thanks ! Googled around and found the 30-days trial of HEX TOOLBOX to handle the files well. If anyone wants to try it in Windows XP, the info might come in handy.

If anyone wants to patch Ibara, the neccessary bytes can be found quite at the bottom of the file, so searching the file backwards speeds up things alot.
User avatar
P_HAT
Posts: 1954
Joined: Mon Mar 12, 2007 10:52 am
Location: Ukraine; Yalta
Contact:

Post by P_HAT »

Well, i'm suck, and just never used hex editor >_>
I think i must read manual D:
User avatar
GaijinPunch
Posts: 15646
Joined: Mon Jan 31, 2005 11:22 pm
Location: San Fransicso

Post by GaijinPunch »

Now you just need to figure out how to turn off the filtering and those ports would be manageable.
RegalSin wrote:New PowerPuff Girls. They all have evil pornstart eyelashes.
User avatar
EOJ
Posts: 3227
Joined: Fri Mar 11, 2005 6:12 am
Location: Hawaii
Contact:

Post by EOJ »

GaijinPunch wrote:Now you just need to figure out how to turn off the filtering and those ports would be manageable.
Yeah. Mushi would be playable for me then, but not Ibara. The total lack of slowdown in that one kills the game completely.
User avatar
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Post by undamned »

GaijinPunch wrote:Now you just need to figure out how to turn off the filtering and those ports would be manageable.
Yeah, I thought that's what this thread was initially... :(
-ud
Righteous Super Hero / Righteous Love
User avatar
ReKleSS
Posts: 420
Joined: Sat Sep 03, 2005 1:38 am

Post by ReKleSS »

antron wrote:ReKleSS, are your pictures Yoko or Tate, Composite or RGB?
The game's set to tate, but the monitor's still horizontal. Connection is RGB.

Filtering is another problem entirely. This was fairly easy because it's set through a system call - it's a pair of instructions that exist only to change video modes, so it's easy to search for and mess with. Filtering is set in packets that get get built up then transmitted to the video chip, so I'd have to actually understand what a fair portion of the code is doing. I'd still like to try it, but it will be much, much harder.

btw, the tool I used was HxD. I tried various linux ones, but none of them knew how to not hold the entire file in memory, which caused problems.
弾もまたいで通る
User avatar
General Martok
Posts: 81
Joined: Thu Jul 26, 2007 2:27 am

Post by General Martok »

Hi

I have applied the mentioned low res fix to the mushi iso , and tried to run it in pcsx2 (ps2 emu). Unfortunatly the fix doesnt work in the emu and it's still running interlaced . Any idea if there is any way to get it to work in pcsx2 ?
Other low res games like ddp doj run fine in low res , eliminating the need for deinterlacing

Image

mushi refusing to switch to progressive after hex editing

Image

no problems with other games
User avatar
antron
Posts: 2861
Joined: Wed Feb 22, 2006 7:53 pm
Location: Egret 29, USA

Post by antron »

General Martok wrote:no problems with other games
you tried other games?
what other games did you try?
User avatar
General Martok
Posts: 81
Joined: Thu Jul 26, 2007 2:27 am

Post by General Martok »

No I wasn't hexing any other games , what I meant were games which nativly run in progressive mode like ddp doj and espgaluda . Now I'M wondering why mushi doesn't work after the fix (only talking about pcsx2 here , it works on my ps2)
User avatar
indstr
Posts: 802
Joined: Mon Oct 29, 2007 4:27 pm
Contact:

Post by indstr »

how did you disable the filtering in DOJ? it looks blurry as crap on my pcsx2. also, does mushi run fullspeed for you? the only ps2 cave game that is fullspeed for me is doj. mushi is ALMOST fast enough but not quite :( intel core 2 duo e4300, geforce 7800 gs agp, 1gb ram
Post Reply