Page 2 of 3
Re: Wince+CDDA
Posted: Sat Sep 14, 2024 6:32 pm
by nuggetreggae
shows how much i know! so is all SH4 code a kind of "microcode" or does each exe, or the rom or system or whatever have a jumptable so when ordinal 179 is called it retrieves a physical address from a table? Does that mean that putting FFE7 in worms would make playback start at track 1?
I've been doing loads of jap GDI conversions recently and a couple of the dodgy mahjohg games played whichever damn track they felt like (even data - yuck!) and froze at the end of the track until nopping out that 25e7 in the ip.bin. found 2 now. need to add them to your list! Thx for your output and input n enjoy your sunday!
Re: Wince+CDDA
Posted: Sun Sep 15, 2024 2:43 pm
by pitito
nuggetreggae wrote: ↑Sat Sep 14, 2024 6:32 pm
shows how much i know! so is all SH4 code a kind of "microcode" or does each exe, or the rom or system or whatever have a jumptable so when ordinal 179 is called it retrieves a physical address from a table? Does that mean that putting FFE7 in worms would make playback start at track 1?
I've been doing loads of jap GDI conversions recently and a couple of the dodgy mahjohg games played whichever damn track they felt like (even data - yuck!) and froze at the end of the track until nopping out that 25e7 in the ip.bin. found 2 now. need to add them to your list! Thx for your output and input n enjoy your sunday!
It is possible, although I did not try to use that value at the time, because with 00E7 I was satisfied with finding the cause of the problem in Worms Pinball.
Regarding the value to edit in the IP.BIN, it is a value edited in the hack created by binhack and not present in the original IP.BIN, so it somehow creates problems in some WinCE games.
The FIX repairs all or almost all those games that have problems playing tracks, repeating the same track over and over again.
I can add the tested games in the main post if you wish.
Re: Wince+CDDA
Posted: Mon Sep 16, 2024 12:38 am
by nuggetreggae
i think its a good idea, i will try to dig out the obscure jap ones i found that need it as well. by the way it ONLY seems to function while booting 0WINCEOS.BIN, any katana, even SAMPLE.BIN WINCEOS loader fails after applying (just reboots). How do you find that shiz? on Z80 i'd be all over it (I've written streaming video driver for Z80), and really need to learn some SH4. I've virtually never run sh4 in my pc, always on gdemu. Unlike ZXSpectrum/Spectaculator Emu one cannot trust SH4 emu to run the same as real hardware. I guess the GD Hardware lock is difficult to implement on Emu!
If you have time sometime i'd love to know how to view a disassembly on the pc.
Best Regards, Archie
Z80 video streaming is here.....
https://www.youtube.com/watch?v=VHc2KJzfKao&t=4s (you may notice devo's whip it didnt get played in this video, youtube's algo did a content match on it!!!!! 4bit 8khz sound 10frm/sec 8kb/frm - unbelievable!)
Re: Wince+CDDA
Posted: Mon Sep 16, 2024 2:44 pm
by pitito
I have already edited the first post with the games that were tested.
The fixes only work on WinCE games, for Katana you must apply hack CDDA on the binary.
If you want to see the sh4 encoding you can use GHIDRA
https://github.com/NationalSecurityAgency/ghidra
Re: Wince+CDDA
Posted: Fri Oct 04, 2024 8:59 pm
by nuggetreggae
hey pitito
I got an interesting one for you here!
The Next Tetris Online Edition. I hacked it as normal, adding 3 blank tracks to the beginning, hacking 0WINCEOS as normal, IP.BIN 25C7 hack, built and ... silence. So I checked Zorlon CDI version. CDDA starts at track 1. Music plays. Changes to another track at the correct time in-game as well.
So I check game options, yeah it's got the CDDA track selector like VC2 and SR2 (which plays tracks 1,2, but tracks 3-10 it leaves (i assume) a 2 sec gap then starts track 1 (ie starting at LBA 0). Then I check CDI files, and nothing is changed except 0WINCEOS. (standard 1-sector-shift). Even the IP.BIN compared to a regular one looks totally normal. I edited the TOC1 in the IP.BIN and as usual this made no difference whatsoever. Editing 25C7 to 0900 in the IP.BIN causes the game to not play any audio whatsoever.
So It's kinda behaving like the forbidden fruit (SR2 and VC2) and you might like to take a look.
Hope you're well, Best Regards!
Re: Wince+CDDA
Posted: Fri Oct 04, 2024 9:24 pm
by nuggetreggae
ok so this next tetris, I built with 3 blank tracks at the beginning again, but without the 25C7 IP BIN hack. selecting tracks 1 or 2 in options results in silence forever, but track 3 onwards leaves a 10-15 sec gap then the first game track (track 4 now) starts playing, ie again, starting at LBA 0. Going to burn it with custom CDDA in 1,2 CDDA slots to see if it processes the start of track 2 correctly. Will also try changing all the LBA of audio in the GDI to see if that makes any difference.
So substituting my own tracks for 1,2,3......
1) plays ok
2) leaves a gap then starts playing maybe a sec into the track (maybe pregap related) but plays ok
3-10) does machine gun sound on audio being played then plays track 1
GDI Experiments
1) Changing LBA did not change anything - all tracks played fine
2) Corrupting all start points in the IP.BIN TOC in track 3 did not disrupt anything. I'm not sure if when using GDemu the values in GDI file override track03 IP.BIN but ....
Edit Yes changing track LBA values in the .GDI file caused data playback when set to data areas of the GD etc., so value is taken from there. I assume that will equate to the CD's TOC (NOT IP.BIN) on a CDI. where is that? is there a different one for subsequent sessions?!?!?!
Re: Wince+CDDA
Posted: Sat Oct 05, 2024 5:48 am
by pitito
I can't tell you anything about Next Tetris at the moment, because I haven't checked it and I don't know what problems it may have...
But if there is a working CDI...
Maybe the problem is yours when creating a CDI.
Anyway, I'll try to check what you tell me as soon as I can, to see what similarities there may be with VC2 and SR2.
Editing LBA in .GDI is a bad idea since it is the access data where each track is located...
Re: Wince+CDDA
Posted: Sun Oct 06, 2024 11:03 am
by nuggetreggae
yes maybe the problem is mine, but after lots of experience, probably not.
I thought it would be interesting to you, AND DONT DOUBT YOUR ABILITIES.
I do not code yet, but will. The CDI plays audio, but only tracks 1 and 2 (of 10)
These play from CDI track 1/2 with no modified files (WinCE audio usually only plays from track 4 onwards)
Re: Wince+CDDA
Posted: Sun Oct 06, 2024 5:58 pm
by pitito
nuggetreggae wrote: ↑Sun Oct 06, 2024 11:03 am
yes maybe the problem is mine, but after lots of experience, probably not.
I thought it would be interesting to you, AND DONT DOUBT YOUR ABILITIES.
I do not code yet, but will. The CDI plays audio, but only tracks 1 and 2 (of 10)
These play from CDI track 1/2 with no modified files (WinCE audio usually only plays from track 4 onwards)
I just checked, and yes, you are right.
Both the PAL and USA versions only play tracks 1 and 2 from the CDI without the need for dummy tracks.
When you select any other track from the options, the player seems to reboot, however if when playing the game it selects any track from 3 onwards at random because it doesn't find it, it seems to be continually searching for it.
It's curious since track 03 is where the HD tracks start in the GDI and it may be due to the same problem presented in SR2 and VC2.
Also this game contains the DLL "OLEAUT32".
EDIT:
I created an iso with 0wiceos scrambled and original IP.BIN, these isos only work in emulator, because the ip.bin is not hacked.
But this lets me know if the problem comes from the hack for IP.BIN.
The result is that this way the CDDA does not work, just like it happened in WORMS PINBALL and it happens in SEGA RALLY 2 and VIRTUA COP 2.
Conclusion
What makes track 01 and 02 work in Next Tetris is the IP.BIN hack itself (Binhack)...
And it seems that it is the value 25 C7 that is involved for this to happen and for that reason when changing it to (nop= 0900) it stops working.
I have two theories...
That the cdda needs some extra hack for the IP.BIN.
Or disable 25C7 to nop so that it doesn't obstruct a possible hack from the game's EXE.
Re: Wince+CDDA
Posted: Sat Oct 12, 2024 5:30 am
by nuggetreggae
interesting. thanks for looking. I figured you might be interested because there is an island of "working" in the sea of "Impossible CDDA" so may have a mechanism to look at and maybe try to duplicate it to the unworking section....
In the case of VC2, that game was also on the Smash Pack, which echelon worked on. in his nfo it says "Ripped: VC2 CDDA" conveniently circumventing the fact that even he was unable to fix it haha.... you mention OLEAUT32.... is that common to all these CDDA issue discs?