English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 May 2019, 19:35   #1
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Real hardware UAE state file loader

(Not yet in News forum, more testing needed first)

Introducing UAE state file loader for real hardware.

http://www.winuae.net/files/b/ussload.zip Source in winuae source tree (utilities/stateload) (NOTE: name changed to ussload, original name was too long to type...)

ussload: load UAE state files on real hardware.

Supported hardware configurations:

- Common 68000 A500 configurations. (chip ram, slow ram and fast ram supported)
- A1200 68020 configuration (fast ram is also supported)

Information:

CPU should match statefile config but it only causes warning. Mismatched CPU most likely won't work.
RAM config must match and at least one RAM address space must be 512k larger.
Both compressed and uncompressed statefiles are supported.
HD compatible (statefile is completely loaded before system take over)
KS ROM does not need to match if loaded program has already completely taken over the system.
All, even ancient statefiles should be supported, confirmed with UAE 0.8.22 created statefile.
Floppy state restore is not tested but at least motor state and track number is restored.
Statefile restore can for example fail if statefile was saved when blitter was active or program was executing self-modifying code.

RAM config examples:

512k chip ram statefile: hardware must have 1M chip or 512k chip+512k "slow" ram or 512k chip+512k real fast.
512k+512k statefile: hardware must have 1M+512k or 512k+1M or 512k+512k+512k real fast.

Note that uncompressed statefiles require at least 1M contiguous extra RAM because all statefile RAM address spaces need to fit in RAM before system take over.

A1200 chip ram only statefiles require at least 1M fast ram.

Background colors:

- red = decompressing/copying chip ram state
- green = decompressing/copying slow ram state
- blue = decompressing/coping fast ram (0x00200000) state
- yellow = setting floppy drives (seek rw head)

---

Change history:

- AGA support fixed, version string added.
- CIA interrupt state restore fixed
- Do not write to read-only, unknown, write triggered or strobe registers.
- ACA500/ACA500plus/ACA1221EC automatic maprom support, new command line parameters.
- Name changed from uaestateload to ussload
- Fixed DIWHIGH restore
- v0.4
- Loading mismatched CPU statefiles (for example loading 68000 statefile in 68020 system) does not crash (but loaded program probably does..)
- Start CIA timers just before jumping to restored code.
- v0.5
- nocache, pal, ntsc options, audio state restore improvement.
- v0.6
- ACA1221 (and most ACA123x variants) map rom support.
- v0.7

Last edited by Toni Wilen; 10 May 2019 at 20:22.
Toni Wilen is offline  
Old 05 May 2019, 00:24   #2
alpine9000
Registered User

 
Join Date: Mar 2016
Location: Australia
Posts: 676
Wow this is cool - so with an ACA500+ booted into HD config I should be able restore to a 512/512 system takeover save state?
alpine9000 is offline  
Old 05 May 2019, 02:07   #3
gulliver
BoingBagged

 
Join Date: Aug 2007
Location: The South of nowhere
Age: 41
Posts: 1,936
This is absolutely fantastic!

Thank you!

PS: Are you willing to extend the supported hardware?

Last edited by gulliver; 05 May 2019 at 02:13.
gulliver is offline  
Old 05 May 2019, 09:53   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Quote:
Originally Posted by alpine9000 View Post
Wow this is cool - so with an ACA500+ booted into HD config I should be able restore to a 512/512 system takeover save state?
Yes. ACA500(+) makes it really easy to match config + extra ram. (Thats how I did some quick real hardware tests)

Quote:
Originally Posted by gulliver View Post
PS: Are you willing to extend the supported hardware?
A1200 basic config should be supported now. But it is not possible to load state files without at least 512k (usually 1M or even more depending on how well chip ram contents compressed) fast RAM. Temporary space for statefile data, internal state, stack and code is needed and it can't be in same address space or statefile memory contents would overwrite it.
Toni Wilen is offline  
Old 05 May 2019, 10:20   #5
malko
Ex nihilo nihil

malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 1,548
It's amazing Toni ! Great add-on to WinUAE
malko is offline  
Old 05 May 2019, 12:57   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Plain A1200 statefile + A1200 + ACA1221 combination confirmed working. Unfortunately many AGA games keep AmigaOS running (at least some interrupts) which means KS ROM must be exactly same or it will crash immediately.

Perhaps later I'll implement automatic KS ROM loader if hardware has supported map rom feature..
Toni Wilen is offline  
Old 05 May 2019, 14:21   #7
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 658
Latest version works very well with A500 1M chip savestates and Supra 2M sidecar on the Amiga. Earlier version didn't restore sound and no keyboard input was accepted. Tested with Trap Runner game.
clenched is online now  
Old 06 May 2019, 17:27   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Automatic Map ROM support added, currently ACA500 (untested), ACA500plus and ACA1221EC is supported.

If ROM mismatch, ROM image is automatically loaded from devs:kickstarts (same naming that whdload uses) and used.

New command line parameters:

- debug = show debug information.
- test = parse and load statefile, exit before system take over.
- nomaprom = do not use map rom.

Previously default output was always "debug" mode.
Toni Wilen is offline  
Old 08 May 2019, 14:00   #9
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 658
v0.3 restores music but no graphics at all. Attached ADF is being tested. v0.2(!uaestateload) is the one that works best. Game disk not needed right away. Also WinUAE can show trouble without copying to a real disk.

Last edited by clenched; 08 May 2019 at 19:01. Reason: delete attachment
clenched is online now  
Old 08 May 2019, 17:31   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Fixed.

DIWHIGH restore was wrong and it was always written to. Game didn't update DIWSTRT/DIWSTOP in copperlist: wrong DIWHIGH setting was kept.
Toni Wilen is offline  
Old 08 May 2019, 19:05   #11
clenched
Registered User

 
Join Date: Sep 2008
Location: Gainesville U.S.A.
Posts: 658
It's working fine again. This tool seems a good way to look at IPFs on a real Amiga which have only token copy protection early on. Compared to AR3 save + Aload command. (no warp speed default crate). Save grew from 277k to 458k. Took over 3 minutes to pack, uss just an eyelash to make. So maybe an extra save can be squeezed on a floppy.
clenched is online now  
Old 08 May 2019, 19:26   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Nice and nice use case idea too

I'll probably do aminet release in next few days.
Toni Wilen is offline  
Old 09 May 2019, 00:33   #13
jbl007
Registered User
 
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 405
Does restore also work under emulation? For me it didn't. But I should mention I created the save state with fs-uae...
Bootable test adf attached.
Edit: Same result with winuae.
Attached Files
File Type: 7z disk.7z (218.9 KB, 23 views)

Last edited by jbl007; 09 May 2019 at 01:12.
jbl007 is offline  
Old 09 May 2019, 05:13   #14
demoniac
Registered User
 
Join Date: Jul 2005
Location: -
Posts: 1,351
Very nice feature!
demoniac is offline  
Old 09 May 2019, 08:22   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Quote:
Originally Posted by jbl007 View Post
Does restore also work under emulation? For me it didn't. But I should mention I created the save state with fs-uae...
Bootable test adf attached.
Edit: Same result with winuae.
This seems to require better timing when starting CIA timers. (Syncing CIA start with vblank perfectly is impossible but hopefully it isn't required)
Toni Wilen is offline  
Old 09 May 2019, 12:59   #16
Phantasm
Not a Rebel anymore
Phantasm's Avatar
 
Join Date: Apr 2005
Location: UK
Age: 46
Posts: 262
This looks quite cool although i was trying to think of a good use case for this.



I wonder if creating a snapshot with the machine sitting at workbench with all my startup stuff loaded and restoring it from the startup-sequence will load more quickly than the usual boot process
Phantasm is offline  
Old 09 May 2019, 13:20   #17
jbl007
Registered User
 
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 405
Quote:
Originally Posted by Phantasm View Post
I wonder if creating a snapshot with the machine sitting at workbench with all my startup stuff loaded and restoring it from the startup-sequence will load more quickly than the usual boot process
Hm, sounds like a good idea, but I don't think it will work, because you need to make sure, that ram state and disk state are always in sync or it will lead to (filesystem-)corruption.
jbl007 is offline  
Old 09 May 2019, 13:54   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Yeah. Don't even attempt it. I think HD statefiles are already rejected but if not, they will be soon..

It would cause data corruption (even if HD controller state is restored) because RAM state (buffers etc) would not anymore match HD contents. (Emulation has same problem, except when using directory harddrives where all the buffering is in host side and can be restored fully)

My use case and why I implemented this: to be able to quickly and repeatedly run some specific demo or game position. Makes compatibility testing less annoying and much faster.
Toni Wilen is offline  
Old 09 May 2019, 17:39   #19
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 22,777
Quote:
Originally Posted by Toni Wilen View Post
This seems to require better timing when starting CIA timers. (Syncing CIA start with vblank perfectly is impossible but hopefully it isn't required)
CIA timer startup moved nearer to final jump to restored code. wws.uss now works.
Toni Wilen is offline  
Old 10 May 2019, 13:00   #20
jbl007
Registered User
 
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 405
Quote:
Originally Posted by Toni Wilen View Post
wws.uss now works.
Confirmed, this game can now be savestated/restored with ussload 0.5.
Nice side effect: It also works on stock A1200 if you disable cpu caches and AGA in early startup menu.
For me it's 30+ years too late.
So new use case for ussload: bypass incompatible track loaders and/or cracktros.
jbl007 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
HAM Video Variants - FS-UAE vs Real Amiga Hardware movec Amiga scene 44 20 August 2017 04:51
Detect file-loader error majikeyric Coders. Asm / Hardware 0 02 March 2016 17:55
ASM: Hardware Track Loader Vortex Coders. Tutorials 172 18 May 2013 20:44
Game loader stuck on certain track after save state restore andreas support.WinUAE 2 26 March 2011 19:59
Hardware File Loader h0ffman Coders. General 9 02 December 2010 16:40

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09407 seconds with 13 queries