UniROM 8.0.K - GDB Debugging, install/backup to/from memory card, homebrew from memcard, etc

Downloadable items posted by PSXDEV members are within this forum.
User avatar
mistamontiel
Active PSXDEV User
Active PSXDEV User
Posts: 53
Joined: Jul 01, 2016
Motto: ..!!
Location: Miami, FL, CUBA
Contact:

Post by mistamontiel » April 24th, 2020, 6:38 am

sickle wrote: April 22nd, 2020, 8:44 pmAny chance I could persuade you to take the back off that cart and grab a picture just to be 100% sure it's a dual chip one?
Image

My Gameshark v2.4

Sorry if misinterpret, did I read that can use toggle switch hopeful in the future? To go to BIOS for save management

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » April 24th, 2020, 7:09 pm

@mistamontiel
Cheers, it's not the cart I thought, but that's super helpful :D
Should be cleared up now.

@mistamontiel, @apache thunder
There's now an "Exit" option which drops you back to the normal BIOS.
Doesn't keep the CD unlocked, but hey, it's a start!

@rama
Lol can work on the X/O switch when the settings saving is worked out.
(There's already a chunk of the cart assigned for this). Guess I could just remove the circle-to-reboot feature, since it's reasonably pointless unless you're me.

I'll add a pulsy selector though!

Changes:
- Exit option
- Added the AMD chip
- Added SquareSoft74's bonus XPlorer collection via a Bonus ROMs menu on the boot disc
- Minor visual tweaks

Todo:
- Look into dual chip booting
- Pulsing selector thingie for rama
- Make circle do less

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » April 25th, 2020, 9:34 pm

Sounds like good improvements :)

I also noticed that one game seems to overflow the stack.
Battle Arena Toshinden 4 PAL (now an Anime game for some reason) seems to crash into a region where UniROM variables are stored :p



User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » April 26th, 2020, 3:26 am

rama3 wrote: April 25th, 2020, 9:34 pm Sounds like good improvements :)

I also noticed that one game seems to overflow the stack.
Battle Arena Toshinden 4 PAL (now an Anime game for some reason) seems to crash into a region where UniROM variables are stored :p


Thanks for telling me!

There's a checksum to handle tricky games like this now and automatically do a bios-based fastload, I'll add that one before the next release.

(Kinda weird that it didn't straight up crash though; there are a bunch of weird games like Parasite Eve 2 which load like 1.9mb worth of data and half of it's zero'd out. Seems to work fine if you just skip the last few hundred kb :lol: but the fastload works fine with NPAL, so it's all good!

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » April 26th, 2020, 9:32 am

Nice looking forward to the next release. Good to know it's able to read the switch position at least when this is open sourced I plan have the switch toggle between going direct to vanilla boot splash sequence or booting to the menu. (unless you get settings saving support then maybe that could be something I could setup from within the program. But we'll see)

User avatar
mistamontiel
Active PSXDEV User
Active PSXDEV User
Posts: 53
Joined: Jul 01, 2016
Motto: ..!!
Location: Miami, FL, CUBA
Contact:

Post by mistamontiel » April 27th, 2020, 8:28 am

Fixed since my last report:
Metal Gear all throughout and the VR campaign game all working!

Gamera 2000 musics playing seamlessly!

Jumping Flash 2 SCPS-10021 musics start right up!

Need For Speed 1 working!

Vigilante 8 1 working!

Vigilante 8 2 working!

Rollcage 2 working!

Dave Mirra Maximum Remix working!

Grind Session R2 button see tech lines working!

Ape Escape 1 working no more confetti!

Spyro 2 no longer turning flat!

Tomb Raider 2 inputs fixed!

Tomb Raider 5 voice clip loads now without stopping game! Poor Dreamcast port

Wip3out Special working no more confetti!

Resident Evil 1 Director's working!

Resident Evil 2 working!

Resident Evil 3 working!

Fear Effect 1 working!

Colony Wars 3 working! I don't know if was even broke in v6 I mean I spam Start and see title screen long while until menu

G-Police 2 working!

Bugged:
Team Buddies PAL music still stutters

Need For Speed 5 missing tail-lights

Syphon Filter 1 grabbed elevator last level froze, using the glorious air taser guaranteed freeze

Syphon Filter 2 bsod (black) after UniROM

Syphon Filter 3 bsod (black) after UniROM

Destruction Derby 3 now can reach some intro FMVs then bsod

Did not do my whole collection unlike v6 to check for new bugs because I r lazy!

:praise

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » April 28th, 2020, 4:45 am

Just tested my "Picks" demo disc. (SPUS-94951). It doesn't seem to boot with 8.0.b1. black screens and never boots.

I noticed this demo disc doesn't play the intro/press start screen if you use the reset button on the console after having it boot to the game selection menu. So it's keeping something in ram on reset and maybe Unirom is messing that up somehow? That's just a guess though. For all I know there is a register it checks or something and it knows when the console's been soft reset.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » April 28th, 2020, 10:05 am

@apache thunder
That's the switch code in place for the next release!
However it needs to be in the OFF position to enable unirom (due to some carts having a push button and weird mappings on unknown carts.)
It's a tentative change though and could be reverted at any point if it's causing issues!

Re: picks
Hah much as I'd love to (fucking love demo discs, little time capsules!)... I can't put in the time to support all demo discs! Definitely let me know if the next build's fastload fixes it - if so that can be made automatic.

@mistamontiel

Good news! That's NFS5, Syphon1, 2 and 3 working :D
(though I haven't played Syphon properly yet, looks good so I'll play it in a bit)

Team Buddies, yeah the music's a bit spazzy but thankfully it's minor.

Weirdly enough though I developed the NTSC-PAL code on DD3 RAW, so I've no clue what's going on there. Will look into it this weekend!

Cheers again!

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » April 28th, 2020, 12:57 pm

Oh super cool. If the demo disc doesn't work it the switch being usable for booting stock will be super helpful as I don't want wear out the cheap connector on the cart constantly pulling it out/plugging back in.

The switch being on or off doesn't matter. I haven't really bothered to memorize which position was the on position since the casing doesn't label the switch and I haven't really used the original ROM on it long enough

Also I saw your MakeROMCS repo. While playing with it in VS I noticed the warning on compile about an unused veriable and noticed this:
Semicolon.jpg
I've been doing a lot of modding for Enter the Gungeon which is a Unity game that uses a lot of C# code. Since it has no official mod support, mods are made entirely in C# DLL projects so I've gotten a little familiar with it so happen to immediately know the issue you ran into there.

When using goto, you just have to end the tag you are pointing it to with a semicolon. No sacrificial variable needed. I compiled this with this change just to be sure and no issues! ;)

If it still gives you issues compiling it maybe due to VS version? I'm using VS2015 (Also have 2019 installed in case I need that) and never had issues terminating those with semicolons. I've done some C/C++ stuff a little bit working on some homebrew things on Nintendo DSi so guessing maybe there the semi colon isn't a thing. But in C# it certainly is. ;)


EDIT:

Also noticed the unreachable code warning (that one doesn't show in the compile log though so I'll show you screenshot of where it is)
Unreachable.jpg
I fixed it. The end result is the goto thing you used is no longer needed. :P
CodeExample.jpg
While I was at it, I fixed a minor issue with the console text output. The release info text gets cut off with Windows's default console width. To ensure this doesn't happen and the info is more readable, I fixed it so it displays like this. The before on the left and the fixed version on the right:
ConsoleFix.jpg
Here's the code I changed:
► Show Spoiler
You do not have the required permissions to view the files attached to this post.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » April 29th, 2020, 7:37 am

Hah, thank you Spenser, missed a few things there.

Without getting too far off topic:

layout issue: lmao no that's just a bug, I forgot some newlines when switching WriteLine to Write!
goto: gonna keep the goto 'cause it's fewer variables and there's no point fixing something VS is wrong about, lol

lowerCaseCamelHump vars in C# btw if you want to contribute at some point!
(not sure if for your sake or mine either but it's fine to ease up on the documentation a bit!)

Image

Switch:

Even if the switch is an issue (and it's looking like it might be - some carts have weird, weird logic).. I've set normal bios boot to Triangle so you can just tap it and go, should be good.

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » April 29th, 2020, 9:14 am

Good to know there will still be an option if the switch doesn't work out. As for the change in FindSequence, yeah the rewrite to avoid the unreachable code doesn't' really change the function in any meaningful way. So yeah meant that more as a suggestion. And yeah all I did was add some new lines to fix the layout. I wasn't sure if you were aware of the issue so brought it up.

As for the switch thing. Hopefully you'll still have commented out code for it floating around in the source once this get's open sourced. There's a chance the switch code will work on my cart so I could still attempt it on my own time once it's open sourced. Bricking it won't be too much an issue. I have a second cart I haven't flashed at all yet so can still use that to swap disk method into to get back into a Unirom flasher. :D

It's been awhile since I've compiled C code (though I've recently updated NTR_Launcher with newer cart loading code so I sorta got back into the C side of programming. NTR_Launcher is a cart launcher for the Nintendo DSi/3DS that allows booting old flashcarts). Hopefully it should be somewhat similar to the stuff I've worked on with Nintendo DSi stuff which was also all C/C++.

No doubt the make files (or lack there of) will be different and will need different build tools for them. What tool chain will I need to download so I'm ready to compile the source code when it's available?

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » April 29th, 2020, 11:06 am

No worries man, cheers for pointing it out. Fixed the layout and dropped a wee credit at the top.

DSI loader sounds cool - one of those things I always wanted to get into but such little time!
(And if I break it, where will my animal crossing buddies live?)

Unirom's now mostly C with a couple KB of asm, but it's well documented so I think you'll have no problem at all.
With most things it's more a case of learning the specifics.

Should be just be the regular old PSYQ from here
http://www.psxdev.net/downloads.html

The readme on github has install information
(Basically install to c:\psyq\ and you should be good to go - and yeah lack of make files, it's just batches!)

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » April 29th, 2020, 4:53 pm

Oh neat. This thing looks ancient. Mostly 16 bit stuff. None of which will run on my Windows 7 machine since it's 64 bit. But hey I got a Compaq Presario 4112 with Windows 95 setup behind me that will be the perfect platform for this. Already got this burned to a CD. So I'll play with this on that machine. Could drop it in a VM. But meh...kinda too lazy to setup a new one and my XP VM is already pretty cluttered so I'll give my 4112 a good purpose since i haven't used it in awhile. I can code like was I was still living In the 90s. :D

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » May 4th, 2020, 11:29 am

Ok noticed the new build go up on Github. (I guess you haven't posted it here yet because the site was acting up earlier today) Tested it. It flashes and boots on my CodeCard fine. Though the switch doesn't seem to do anything for me. :(

As for Fastboot. Not sure how to trigger that? L1 doesn't do anything for me. (the normal boot is now on R1). There is no fast boot option in any of the menus either. Maybe I'm missing something obvious here.

Also I'm interested in making a backup of the rom of the other code card (they both appear to have identical roms). What hardware and software would I need to do this? There is a parallel port on the back of the both the code cards but I suspect those aren't useful for anything. I do have some old PCs (like my Presario 4112) that have serial ports. I may attempt to find a serial cable if I'm aware of any dumping tools I can use. But I don't want to go out and buy the stuff for this without knowing if the software to dump the rom exists or not.

EDIT: Now that Unirom 8 supports my cart and can flash other stuff to it, I tested v6 to see if my demo disc boots from fastboot (since apparently can't find it in v8.0.2b). It does boot. So assuming your fastboot works in a similar manner, I can confirm the PlayStation Picks Demo disc will boot with fast-boot with Unirom v6. But for your version of UniRom I won't know for sure until I find the fast boot option (or you fix it cause maybe it's broke and not actually working?)

Also you forgot to update the hex editor in the menu. It shows R1 as the key button. But you updated that to R2. The menu text still says R1. ;)

EDIT2: I tested the Exit option. That appears to be working great. Boots the legit copy of my Demo disc just fine so the Exit menu seems to work. It's too bad the switch doesn't seem to do anything for me. Tried booting with switch in both positions. Is the Exit option tied to a button press? If not, I suggest one be added in next release for users who's switch doesn't work with Unirom (like with mine apparently. :( )

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » May 5th, 2020, 3:14 am

8.0.2b Release notes:


8.0.b2 - Exit menu, UI tweaks, FastLoad, etc.
- AMD AM29F010 support (0x01,0x20)
- Switched boot to R1
- Added L1 for FastLoad option
- Checksum for Jumping Flash (USA) to force fastboot
- Fixed a visual dual-bank glitch
- Roms are now numbered 1->whatever instead of 0->whatver-1
- Disabled entry point 0x1F000000 to allow BIOS booting
- Exit menu!
- Little pulse on the menu highlight
- Removed CDROM status (was causing issues)
- Fixed an issue with the chip detect locking up writing
- fixed some volatile/nonvolatile consistency
- Switched u_long to a defined ulong so visual studio calms down.
- More detailed info for XFX 3rd Gen detection
- Selected ROM size now shown on the rom loader screen
- Added Sanyo LE28C1001 EEPROM support
- The switch works!
- Added Squaresoft74's ROM collection to factory restore your cart
- Restored support for titles:
-Syphon Filter 1-3
-Battle Arena Toshinden (via boot disc)
-Parasite Eve 1
-THPS3 (yaaaas)
-Critical Depth
- Fixed broken SIO commands and restored BOOT over SIO
- Fixed a bunch of credits (like so many)
- Switched the FastLoad list to an actual list format
- set up a single define for uint, ushort, uchar, etc
- now reads unirom_s.rom and unirom_w.rom from the disc directly
- removed dosbox from the tools dir (using Orion's cpe2x.exe)
- status menu now reports EEPROM size
- rom override function - can attempt write by holding R4 + Star
- added a watch mode to NoPS
- Switched over to Lameguy's mkpsxiso for for quicker iso builds

TODO:
- Investigate Xploder PRO (Germany) r3.3 petitPRO 1999-08-31 [!]
- Investigate things hanging on exit
- Detect unlock state (19,05) for jap consoles
- Check Bug's Life (SCUS-94288) memorycard bug after level 1
- Lots of char* vs char[]
- Remove a line at a time from the logger
- Debug command 19,5 to get license state + Jap console warning
- Look into WithCaetla crashing on Xplorer v1
- Show memory area type




@apache thunder
Lol yeah the site was acting up so I skipped it.
To trigger fast load, just HOLD L1 and tap R1 or use the menu (it's just a sort of hidden feature now untill I determine how much it's needed!)

Backup:
Xplorer - you can use a normal parallel / LPT1 / Printer setup with a 32 bit (or older OS) , something like XFflash? For win7 you'd need a driver, but unirom8 doesn't support that anymore
Action Replay - same thing but you need a voltage-dropped port.. skip it
Modern Way: Most people now using something like an Arduino, FTDI (usb-serial interface), etc and connect it to the serial port... so we can use USB. These boards are tiny, like the size of a memory stick and only require 3 wires.
You can use a hacked PS1 serial cable or just solder to the main board (big pads, real easy job!)

I screwed this into the lid :p
http://www.psxdev.net/forum/viewtopic.php?t=760

Software:
It comes with NoPS.exe ("NoTPsxSerial" - which is a psx serial thing :p)
If you open that in the terminal it'll have instructions.
Also supports Shadow's *actual* PSXSerial and you can use the same interface with SIOLoad, SIOCons etc.
(loads of scene tools)


Swtich:
It's not off the table but I keep finding new and weird setups in cards, which might make it impossible to reliably detect the swich for other people without knowing which cart you're on. E.g. memory loc for xplorer/par/arpro are different.. which is fine, can check them all.. but with certain combinations, they report e.g. not being there or being there with random values, etc... so it needs work!

I knew you'd be unhappy,. so I bound exit to Triangle for yah :p

Ty for the hex editor tip, that's in the todo!

Hope that helps :D

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » May 5th, 2020, 4:26 am

Oh I see so exit is tied to Triangle. Cool.

The LPT cable method. So you say I could use that, just not with Unirom v8? I could flash v6 to the cart then use an old PC with the right software? What about the cable? I have 2 types of cables. I have a couple cables. Both of which I think are of same type. One from my Zip100 drive, another from an old scanner. Then there's a special one used to connect/network 2 PCs together via the LPT port. That one I think is wired differently. But I have no idea where I stashed the network LPT cable. I assume the ones used for scanners/Zip drive will work for this?

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » May 5th, 2020, 7:09 am

Oh man, it really was the wild west back then... no real standards, so I'd just try until it works.

Unirom6 afaik *only* supports flashing .exe files, so you'd be quite limited
You can use XFlash through it though which supports some/most of the xplorer stuff (memory editor and all that - there's a windows tool in this forum somewhere). Or you could use catflap (which is a command line util which does similar stuff to the xplorer software but for caetla - later version support caetla on a xplorer)

Just gotta keep pokin away at it and hope your driver is working, your parallel port is in the same mode, the cable works etc.

I mean it's fun... but you could just build a serial cable and join us in the 21s century :p

User avatar
Apache Thunder
Curious PSXDEV User
Curious PSXDEV User
Posts: 26
Joined: Apr 18, 2020

Post by Apache Thunder » May 5th, 2020, 8:04 am

lol I suppose if I was really desperate I could look at the rom in a hex editor (assuming your hex editor supports that. :P ) and just "type it out" into a hex editor on my PC. With the rom being only 128kb, I could maybe spend a good few hours doing that if I really wanted to. lol

I might try and get a serial cable. I really don't want to chop up a link cable though. I've seen a premade one on eBay but it's in UK and has a estimated delivery date of June. :(

EDIT: Just tested FastBoot now that I know how to use it. Can confirm that it boots and appears to run properly. The Jumping Flash demo on it also works properly. (lol I have both the full and demo versions of this game. :P )

sogilbert
What is PSXDEV?
What is PSXDEV?
Posts: 3
Joined: Mar 02, 2020

Post by sogilbert » May 6th, 2020, 10:57 am

@sickle


Where's the source code for UniROM? I can't seem to find it. Thank you in advance.

User avatar
sickle
Verified
C Programming Expert
C Programming Expert
Posts: 257
Joined: Jul 17, 2013
I am a: Chocolate-fueled pug fetish robot.
Location: Scotland

Post by sickle » May 6th, 2020, 11:55 am

@Apache Thunder
Solder pads are quite big on the mainboard though, can solder to them pretty easily then screw something into the lid, etc. (e.g. using breakwaway breadboard wires or something. looks like at least 300% cooler!)

Cool, glad it's working. Seems like a fun game, hopefully I get some time to play it :D

@sogilbert
Just tidying it up and fixing issues before releasing; I don't want to be overwhelmed with new code snippets and tweaks while trying to fix other things!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests