Faze port progress : SH4 little endian to SH2 big endian

vbt

Staff member
I'm bothering many people for help (Fox68k, all #smspower) and here is the first result :


raze_first_rom_running.jpg
 
Hey, I know this screen from somewhere. I must have burned it along with your great SMS Plus emu for Saturn.

What about the endianess problems that the title says?
 
RockinB said:
Hey, I know this screen from somewhere. I must have burned it along with your great SMS Plus emu for Saturn.


What about the endianess problems that the title says?


I fix problems slowly it's not yet finished as you can see the the only ROM running. I started to be bored of getting no results, I just hope I'm close to get some games running. I do all test/debug with the yabause debugger :) Time to test another ROM.
 
Have you got a list of games which work with the faze cpu core? Are there any commercial roms that work?
 
RockinB said:
Have you got a list of games which work with the faze cpu core? Are there any commercial roms that work?


Actually, no commercial ROM runs. Now I make my own ROMs to test/fix opcodes. I did "many" endian fixes and two new ROMs runs including a free game :ridinghorse: :


test.jpg
 
Eheh :) first game title displayed :) The game resets itself but that's good to see hang on screen :)


hangon.jpg
 
This looks like a breakthrough!

BTW: while doing my ToDoList, I once more came across the fact that the SH2 can access it's CS2 area in little endian mode, if you set bit 4 of byte at address 0xFF..FE2 (BCR1 register). This means you can access the VDP1 RAM, VDP2 RAM in little endian mode. But in this case, all register accesses to VDP1, VDP2 and SCU need to ne done in little endian, too.

Just a note, I haven't yet tried it out if this is faster. If you can't put the ROM in high workRAM either, then this might be faster in the end.
 
RockinB said:
This looks like a breakthrough!


Not yet, it has not the expected result, it works thanks to a sprintf :D before each call of z80_emulate and it slowdowns the emulation. I didn't find yet what to do to fix this.


BTW: while doing my ToDoList, I once more came across the fact that the SH2 can access it's CS2 area in little endian mode, if you set bit 4 of byte at address 0xFF..FE2 (BCR1 register). This means you can access the VDP1 RAM, VDP2 RAM in little endian mode. But in this case, all register accesses to VDP1, VDP2 and SCU need to ne done in little endian, too.

Just a note, I haven't yet tried it out if this is faster. If you can't put the ROM in high workRAM either, then this might be faster in the end.


Maybe, it would be worth to try this solution but it needs time. I have to switch soon to the C4 entry.
 
well sprintf problem fixed, games run twice faster without it :) There is still one "big" problem which limits test to 32ko ROM.


Test on "Action fighter" with yabause :


FPS with cz80 : 71-91

FPS with Raze : 67-74


Speed difference can be because of my bad work to make it big endian and also some opcodes I had to write (outir and all otxr opcodes). Time to clean raze and maybe restart to avoid too many shlr16 use.
 
Code was updated to use Faze internal memory management instead of common C read/write handlers. It has got some really good results :burnout:


The problem with 32ko ROMs is also fixed, I may publish a beta with one game :)
 
vbt said:
Code was updated to use Faze internal memory management instead of common C read/write handlers. It has got some really good results :burnout:

The problem with 32ko ROMs is also fixed, I may publish a beta with one game :)

Oh, how sweet these screenshots look in my eyes!

The Sonic FPS seems to be quite high, I remember Sonic being a bit slower than other games. I'll be testing it right after the beta is out *yumyum*

Congratulations :rock:
 
Back
Top