Official Rhea Discussion

Clean the cartridge or connector.
x
I'm super new but I wanna contribute. If anybody is interested, I wrote a Powershell script to alphabetically sort all of the CDI files on your SD card so you don't have to drag and drop a million files when you decide to add Astal to your card later :) Just drop your new CDI files anywhere on the card and run the script.

I'm new at coding as you can obviously see, and this only works with CDI files as it's easier to sort single files in single folders.

Strangely enough, open Explorer windows to the card while the script is running causes my Powershell ISE to freeze and I had to hard reboot. I put in lots of warnings just in case it can happen to others! Please don't run this if you can't read it. I shouldn't even have run it but I want to learn Powershell. It works great now, if you can deal with the quirks.


Feel free to edit or distribute elsewhere! Hopefully I save you guys some time with my Teletubbies-level coding.

The Saturn Rhea/Phoebe CDI Alphabetizer
Spoiler
Code:
Write-Host "Saturn Rhea/Phoebe CDI Alphabetizer v.0.6"
Start-Sleep -s 1
Write-Host "by team_andromeda"
Start-Sleep -s 1
Write-Host "=========================================="
Start-Sleep -s 1
Write-Host ""

$path = Read-Host -Prompt 'Input drive letter for SD card (with semicolon)'


$title = "Drive Letter"
$message = "Is " + $path + " the correct drive letter?"

$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
    "Deletes all the files in the folder."

$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
    "Retains all the files in the folder."

$maybe = New-Object System.Management.Automation.Host.ChoiceDescription "&Maybe", `
    "Pauses for 60 seconds and then asks again about deleting the files."

$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $maybe)

$result = $host.ui.PromptForChoice($title, $message, $options, 1)

switch ($result)
    {
        0 {
             Write-Host "You selected Yes."
             Start-Sleep -s 1
             Write-Host "Moving on..."
             Start-Sleep -s 1
             Break
          }
        1 {
             Write-Host "You selected No."
             $path = Read-Host -Prompt 'Input drive letter for SD card (with semicolon)'
             $title = "Drive Letter"
             $message = "Is " + $path + " the correct drive letter?"

             $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
                 "Deletes all the files in the folder."

             $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
                 "Retains all the files in the folder."

             $maybe = New-Object System.Management.Automation.Host.ChoiceDescription "&Maybe", `
                 "Pauses for 60 seconds and then asks again about deleting the files."

             $options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no, $maybe)

             $result = $host.ui.PromptForChoice($title, $message, $options, 1)

             switch ($result)
                 {
                     0 {
                          Write-Host "You selected Yes."
                          Start-Sleep -s 1
                          Write-Host "Moving on..."
                          Start-Sleep -s 1
                          Break
                       }
                     1 {
                          Write-Host "You selected No."
                          Start-Sleep -s 1
                          Write-Host "Start over."
                          Start-Sleep -s 1
                          Write-Host "3"
                          Start-Sleep -s 1
                          Write-Host "2"
                          Start-Sleep -s 1
                          Write-Host "1"
                          Start-Sleep -s 1
                          Exit
            
                       }
                 }

          }
    }

if ( -Not (Test-Path $path.trim() ))
{
Clear-Host
Start-Sleep -s 2
Write-Host "...wait a sec..."
Start-Sleep -s 2
Write-Host "The path you entered does not exist."
Start-Sleep -s 2
Write-Host "Maybe you forgot the semicolon?"
Start-Sleep -s 2
Write-Host "???????"
Write-Host $path "ain't no drive I ever heard of."
Write-Host "???????"
Start-Sleep -s 2
Write-Host "Start the script again."
Start-Sleep -s 2
Read-Host "Press ENTER to exit"
Exit
}

cd $path
$tmpDir = $path + '\tmp'
$counter = 1;
$foldercounter = 1;
$foldersize = 1;
$GameListTxt = $path + '\FullGameListing.txt';


Read-Host "Close all Windows Explorer windows accessing the SD card..."
Clear-Host
Read-Host "Did you close them all?"
Clear-Host
Read-Host "Are you SURE??? This will potentially lock up your PC"
Clear-Host
Read-Host "Alright then...press ENTER to proceed..."
Write-Host "5"
Start-Sleep -s 1
Write-Host "4"
Start-Sleep -s 1
Write-Host "3"
Start-Sleep -s 1
Write-Host "2"
Start-Sleep -s 1
Write-Host "1"
Start-Sleep -s 1
Write-Host "GO!"
Start-Sleep -s 1


if ( -Not (Test-Path $tmpDir.trim() ))
{
New-Item -Path $tmpDir -ItemType Directory
}

Get-ChildItem $path -Recurse -Include *.cdi | Move-Item -Destination $tmpDir
Get-ChildItem -recurse | Where {$_.PSIsContainer -and `
@(Get-ChildItem -Lit $_.Fullname -r | Where {!$_.PSIsContainer}).Length -eq 0} |
Remove-Item -recurse

if (Test-Path $GameListTxt.trim() )
{
Remove-Item -Path $GameListTxt
}

Write-Host "All unique files have been moved to the tmp directory"
Write-Host "You may take this time to clean up any errors/duplicates."
Read-Host "Be sure to close all Windows Explorer windows accessing the SD card..."
Clear-Host
Read-Host "Did you close them all?"
Clear-Host
Read-Host "Are you SURE??? This will potentially lock up your PC"
Clear-Host
Read-Host "Alright then...press ENTER to proceed..."
Write-Host "5"
Start-Sleep -s 1
Write-Host "4"
Start-Sleep -s 1
Write-Host "3"
Start-Sleep -s 1
Write-Host "2"
Start-Sleep -s 1
Write-Host "1"
Start-Sleep -s 1
Write-Host "GO!"
Start-Sleep -s 1

Write-Host "Creating folders..."
dir $tmpDir -Recurse -include *.cdi |
sort @{e={$_.basename}} |
%{
      # set folder name with zero filling for sorting
      $foldername = ("$path\{0:00}" -f $foldercounter)
    
      # if folder doesn't exist create
      if(!(Test-Path -Path $foldername))
      {
            $folderpath = md $foldername
      }
    
      # Check to see if file name
      if(($counter % $foldersize) -eq 0)
      {
            move $_.fullname $folderpath
            $foldercounter++
      }
      # if file doesn't
      elseif(($counter % $foldersize) -ne 0)
      {
            move $_.fullname $folderpath
      }
    
      # Increment counter
      $counter++
      Write-Host $foldername
}

Get-ChildItem -recurse | Where {$_.PSIsContainer -and `
@(Get-ChildItem -Lit $_.Fullname -r | Where {!$_.PSIsContainer}).Length -eq 0} |
Remove-Item -recurse

if ( -Not (Test-Path $GameListTxt.trim() ))
{
New-Item -Path $GameListTxt -ItemType file
}
Get-ChildItem -include *.cdi -Recurse -name | Out-File $GameListTxt
Write-Host "Done!"
Write-Host "See new directory listing in" $GameListTxt
Read-Host "Press ENTER to exit..."
If you have more than 100 images on your SD card, change the following line of code:
Code:
$foldername = ("$path\{0:00}" -f $foldercounter)
to this:
Code:
$foldername = ("$path\{0:000}" -f $foldercounter)
Thanks !

But still waiting for RMENU :)
I just found out that if you have less than 100 images, having 3 digits in your folder names breaks compatibility. I'll update it later, but change the following line of code:

Code:
$foldername = ("$path\{0:000}" -f $foldercounter)
to this:

Code:
$foldername = ("$path\{0:00}" -f $foldercounter)
Hopefully this helps, if anybody tries using this. I'll try and add something to check the amount of folders before renaming it later on, but this is the quick dirty fix.

Gah, aren't we all? :[
I'm still working on my hardware menu, I ran into a little snag, I had to built a test pcb to verify some things. I hopefully will have a working design within a month.
Anybody been able to get the downloads off Isozone of the patched Shining force 3 to work? (or does anybody have them working?)
Anyone ever use an SD extension cable to extend the entry point of your SD card beyond the Rhea/Phoebe? Sticking my giant gorilla hands into the Saturn to grab the SD card has made me wonder if it'd be prudent to go this route. A lot of the reviews for the extenders I see seem to indicate they can be a bad product though. Any thoughts?

EDIT: Going a few pages back, I see someone has done exactly that. Very tempting, I'll need to see if I can find it.
Word of advice on it
Turn the power off as the system dont know that you changed the card
Ah, okay-- you'd be able to normally because you're taking the card on/off the Rhea board directly, whereas the adapter is remaining plugged in, so the Rhea doesn't know you removed the card. Makes sense.
New firmware for Rhea & Phoebe out today :)

3.5.0 (Rhea) - 3.2.0 (Phoebe)

  • Fixed plain ISO image handling
  • Bugfixes in MDS/MDF parser
  • Implemented image_tests and reset_goto INI options
gona test in a moment a bugs life,i believe it did not work before.
just tested a bugs life,still not working.
i have jap sega saturn and used ntsc converted game.
Let me know if it works :rolleyes:
it doesnt work.
Ok. I have tested my PAL dump and freezes after game start at loading screen :(
mail sended to deunan,we have to wait.
Perfect :)
someone knows if is this work?
Not yet apparently ...
So, the latest firmware is said to be able to add features we're all interested in, which may be insinuating that the menu is coming. Anyone know?

Original thread: https://assemblergames.com/threads/official-rhea-discussion.57377/