Saturn proof-of-concept bootloader Pseudo Saturn

Discussion in 'Sega Saturn Programming and Development' started by Cyber Warrior X, Jul 6, 2014.

  1. jhl

    jhl Spirited Member

    Joined:
    Jul 29, 2013
    Messages:
    103
    Likes Received:
    116
    This is a clever hack, nice work!
     
  2. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Yes several ways and several updates available either by disc or Comms port

    If you like I can upload a CD image with a few updates on it (The last update was 2.02C (C it not shown in the menu after it's flashed as it's just a minors codes update so it's the same as 2.02))

    EDIT:

    While I have my capture cable out I might as well do a video later today of it getting flashed with AR4M+ 2.02C firmware (via a Pseudo patched CD) and back to PSEUDO SATURN firmware via the swap trick (I use a model 1 so the swap trick is easy as there is a visual reference via the CD access light), unfortunately I can't show the installer.iso working as it does not like my AR4M+.

    EDIT:

    Booting of the Atlus disc is fine with PSEUDO but booting the SGM from an Atlus results in a reboot, but you can do the normal swap trick (without the action replay plugged in) to boot the Atlus disc and load the SGM, then you can re-insert the action replay and re-flash it with AR4M+ firmware

    If you really want I can make a vid of that
     
    Last edited: Jul 16, 2014
  3. rso

    rso Gone. See y'all elsewhere, maybe.

    Joined:
    Mar 26, 2010
    Messages:
    2,190
    Likes Received:
    447
    Just tested it with a fresh burn (US image, region patched to 'E', on a PAL Saturn). Works fine so far (some FMV and a couple of minutes of gameplay) with the swap trick, so it looks like I just got a bad burn the first time.

    However, I'd still be interested in how well the loader works with this: I have no idea how changing PDS's discs would work with just the swap trick, so I also tried 'unlocking' the drive with a System Disc first, which unfortunately results in the game locking up on a black screen immediately after the 'Team Andromeda presents' screen.
     
    Last edited: Jul 16, 2014
  4. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Region patches are not needed by the way, I also use a PAL console and most games I have played are NTSC but I do have a small display mode switch between PAL and NTSC (An easy mod to do), but the J - U - E code does nothing for the display and does nothing for you if you are using a cart that makes the console region free anyway.

    If you don't have a switch mod to make your console display in NTSC mode then just get the PAL version of this game instead, as forcing some game to run in PAL display mode that are made for NTSC display mode will make them go out of sync and some games will just not work or freeze as a result

    I don't personally know if disc swapping works at the games disc change point though, that is something I asked myself in this thread, I can't see it working though, might do if the Action Replay is always active, I can test that though easy enough just by booting CD2 then starting a new game where it should ask for CD1.

    The reason it would freeze though is because you used a different disc before the backup is because the system has the toc of the "System Disc" stored and the CD-R does not match that and fails to load anything past the main exec file.

    EDIT seems I can't test that way and CD 1 after all the FMVs and after you gave a name scenes it loads to a black screen rather than to in game, the game also asks for the cart to be removed so if it is not removed before that message it will also just reboot the system
     
    Last edited: Jul 16, 2014
  5. rso

    rso Gone. See y'all elsewhere, maybe.

    Joined:
    Mar 26, 2010
    Messages:
    2,190
    Likes Received:
    447
    That's a good point. If I unblock the lid sensor after unlocking the drive (something I didn't bother doing beforce, because you gotta reset the system anyways, right?...), it starts working (CD block now knows to reread the TOC, apparently). My bad, problem solved.

    ...that sounds like the AR-based loader won't work at least with this game, maybe others. Dang. Oh well after all it's just a PoC... Obviously that wouldn't happen with a BIOS replacement or an ODE. It might be something to look out for if one were to go the 'flashcart-mod' route though.
     
  6. Unknown-Organization

    Unknown-Organization <B>Site Supporter 2014</B>

    Joined:
    Sep 28, 2011
    Messages:
    782
    Likes Received:
    6
    You don't own a Saturn? That should be a crime for that.
     
  7. pool7

    pool7 Site Supporter 2014

    Joined:
    Mar 4, 2008
    Messages:
    1,268
    Likes Received:
    134
    IKR?
    There are several reasons to that (not that anyone cares), including the fact that it wasn't until recently (PS2 era IIRC) that consoles started to get officially released in my country. Previously, only some specialized retailers imported them, and that made them even more expensive than they were. Plus they imported mainly the consoles that had a huge market in the US, which wasn't really the case for the Saturn. And I was still in high-school and had a SNES and my parents were against buying anymore consoles.
    Unfortunately things only got worse economically speaking, and now individuals require special permission to import anything (as small or cheap as it may be) which is hard to obtain. To top it off, our local eBay has crazy prices for everything manufactured outside the country...

    Anyway, back to topic...
     
  8. TriMesh

    TriMesh Site Supporter 2013-2017

    Joined:
    Jul 3, 2008
    Messages:
    2,324
    Likes Received:
    750
    Yeah, that should work fine - you just need U1 to U4 and can omit the rest of the chips and their associated components.
     
  9. Jei

    Jei Rising Member

    Joined:
    May 28, 2013
    Messages:
    63
    Likes Received:
    12
    There did used to be a code that allowed you to use PDSaga with an action reply present if that's any help?

    Edit - Found it

    Master:

    F6000914 C305
    B6002800 0000

    Code:

    06002ED0 0009 (JP Version)
    06002EB0 0009 (US & PAL Versions)


    Also I can confirm 100% that saga saves the game after completing each disc so just loading the next disc from a cold boot and loading the save will work.

    Now its just a way of still being able to use the above codes!
     
    Last edited: Jul 17, 2014
  10. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22

    Thanks for that, that may just come in handy for Cyber Warrior X develop this further, though he has plans to re add codes and memcard features
     
  11. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    Looking rapidly on this, it seems 0009 is NOP (On dreamcast it's 0900, endianness?). So it'd be nice to find out what 06002E(B or D)0 does, to patch the disc itself so it boots on PseudoSaturn.

    I 0600 2EB0/2ED0 looks like a ram address to me (11952, 11984). Address 11936 (2EA0) is the saturn "game's own IP" according to someone on a forum: http://segaxtreme.net/forum/showthread.php?tid=3682 I guess he means the main executable, as the dreamcast-like ip.bin is loaded at 06002000 afaik. [edit] That was a confusion, see my next post[/edit]

    So changing the WORDs at offset 0010 (16) in the executable for NTSC-U/PAL to 0009 or offset 0030 (48) for the NTSC-J version...

    Maybe it's 0900 that has to be written as the cd-rom endianness is different than the CPU, as on dreamcast?


    What I'd try: Open a NTSC-U/PAL (or NTSC-J) PDSaga iso, find the executable, patch at offset 16 (or 48) with 0090. If it doesn't works, patch with 0900.
     
    Last edited: Jul 18, 2014
  12. MottZilla

    MottZilla Champion of the Forum

    Joined:
    Feb 1, 2006
    Messages:
    5,066
    Likes Received:
    102
    For a code that's always on you should be able to patch the executable/program file if you work out where in memory the program file is loaded and work out the offset.
     
  13. Cyber Warrior X

    Cyber Warrior X Active Member

    Joined:
    Feb 21, 2013
    Messages:
    32
    Likes Received:
    15
    For future reference: If all else fails you can recover using Ex-Cyber's AR recovery utility or the SGM disc. Ex-Cyber's utility will still allow you to attempt a flash even if it doesn't recognize the flash chips.

    For anyone else having this issue, try the latest version v0.830 in the first post. I added a fix for this cart.

    Thanks for the capture :)

    Since I wrote my own boot loader, there was no point in implementing region protection unless I really want to, and I figured people would probably thank me for leaving it out ;)

    Yeah I'm not sure myself I don't own many multiple cd games and I didn't feel like playing them all the way through just to test it. That being said, if it's an issue and if anyone has a save file close to a disc change, I'm sure I could probably code up a work around or fix.

    Pretty much. 0x06002EA0 is an address in HWRAM. As you already mentioned, 0x06002000 where the ip.bin is loaded. So if you wanted to patch the actual disc, you'd take the address in question(0x06002EA0) strip off the 0x06002000 so you end up with 0xEA0. Since each sector is 2048 or 0x800 bytes, if you do the math it works out to the second sector at offset 0x6a0. Or if you're looking at an iso file it's literally at offset 0xEA0. Also, cdrom data is is the same endianness so the data doesn't have to be byte-swapped. Writing 0x00 to offset 0xEA0 and 0x09 to 0xEA1 should be fine.
     
  14. Helder

    Helder Site Supporter 2014,2015

    Joined:
    Apr 6, 2013
    Messages:
    981
    Likes Received:
    54
    Will your code correctly flash a 16bit chip instead of the (2) 8bit chips used on these carts?
     
  15. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    I'll try fixing PDSaga on the weekend then. I got a modchip, but also an AR and a fixed iso is better than codes imo. Thanks for the confirmation Cyber..

    I was somehow confused as I had in mind that the ip.bin is 16 sectors long but I confused ram address with lba a bit, so I though 2eb0 was outside the ip.bin. Silly me! Doesn't help that by great coincidence, 5eb0 is the start lba of dreamcast games second sessions (swapped endianness) and I'm more used to those.
     
    Last edited: Jul 18, 2014
  16. szczuru

    szczuru Spirited Member

    Joined:
    May 12, 2010
    Messages:
    115
    Likes Received:
    0
    Do you planning to add Memcard functions?
     
  17. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Try the attached

    Would love to claim I made that but it wasn't me :p

    This patches a lot more than the code did

    EDIT don't think that works....

    EDIT AGAIN...

    Oops let me try that again the iso needs to be M1-2048 not M1-2352
    I'm burning this with patches now to test it but I am about to go out for a bit though so will report back later possibly just edit this
     

    Attached Files:

    Last edited: Jul 18, 2014
  18. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Already mentioned a couple of times but, YES
     
    Last edited: Jul 18, 2014
  19. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    The minimal fix to make it work should be:

    - ISO: Write 0x00 at offset 0xEA0
    - BIN: Write 0x00 at offset 0xFE0 and rebuild sector field

    To rebuild sector field: in CDMage, open BIN file, look for errors in sector 152 and select to rebuild sector field (works fine on wine)

    Don't forget to change the header for the PseudoSaturn one if you plan on using it! This doesn't make the game region-free, but it's not needed with either an AR+modchip or PseudoSaturn.


    I modified my BIN today, will test this weekend probably.


    Comparison in format Offset Original Fixed for bin files; red is the fix itself, blue the rebuilt sector field:

    $ cmp -l orig.bin fix.bin | gawk '{printf "%08X %02X %02X\n", $1-1, strtonum(0$2), strtonum(0$3)}'
    00000FE0 D0 00
    00001140 2B 47
    00001141 F3 7D
    00001143 9B 3F
    0000118E FB A1
    00001196 A1 15
    00001197 2A A5
    00001199 9C 6D
    000011E4 E7 6D
    000011EC 49 91
    000011ED FD FC
    000011EF 1D 48
    0000120F DE 67
    00001210 60 79
    00001211 56 31
    00001212 FA 92
    00001213 6D CC
    00001214 BA 01
    00001215 61 1E
    0000121A 1D 0B
    0000121C 92 4E
    00001243 F5 E8
    00001244 37 92
    00001245 0E 16
    00001246 7C A0
    00001247 3D 46
    00001248 0C 6F
    00001249 5D 23
    0000124E 07 4B
    00001250 0F 59
     
    Last edited: Jul 18, 2014
  20. zorlon

    zorlon Spirited Member

    Joined:
    Dec 27, 2013
    Messages:
    167
    Likes Received:
    22
    Even after patching this game still fails after the FMV cuts scenes gave a name after the few scenes and FMV there is goes to a black screen

    I don't have a comms port so can't give much more detail than that, but I have a thought that it may be failing on a second Saturn exec file as I noticed that homebrew discs also have problems launching a second saturn exec file that is not the exec it booted from

    Too tired to even look into that though so may do tomorrow if I get time and if -=FamilyGuy=- doesn't get there first (as I have possibly stated I am not a coder or anything like that, but I don't need to be to understand at least a bit of what needs to be changed, that and I did not make the codes to crack this to start with)
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page