16 April 2020, 10:28 | #1 |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Problem creating my first Whdload install: empty slave
Decided to try to make my first own install using the new Fred's Journey. The game has only one adf file, so it should be simple to create a whdload install for it.
https://www.pouet.net/prod.php?which=85282 Whdload install script goes through without errors and it seems all is ok. However my .slave file is 0 kb in size and I get: DOS-Error #235 (bad loadfile hunk) on loading "Freds.slave" The disk1 file gets created ok and everything else also seems to be as it should (compared to the files of other simple working whdload installs). Is there some basic error in my install script, which could cause this? I've tried with different #version settings (DIC and Files), but the slave is always empty. Any clues? |
16 April 2020, 10:31 | #2 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
Quote:
Did you copy the correct slave to the install directory? If so, I'd like to see the install script. |
||
16 April 2020, 10:52 | #3 | |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Quote:
I'm not 100% sure what do you mean by "copying the correct slave"? Here's the install script. Sorry, just starting this, so be patient |
|
16 April 2020, 10:58 | #4 | |||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
Quote:
Quote:
|
|||
16 April 2020, 11:56 | #5 | |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Quote:
Actually I just realized that I'm trying something way beyond my capabilities here... I though that if there aren't any copy protection stuff or something like that, the installer would patch me the files somehow. How wrong I was... There are some examples supplied with the dev package, let's see. Last edited by emuola; 16 April 2020 at 12:03. |
|
16 April 2020, 18:59 | #6 |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
I have to say this is way out my league :/ I have to start with something a lot more easier.
|
16 April 2020, 19:43 | #7 |
Phone Homer
Join Date: Jun 2006
Location: 5150
Posts: 5,773
|
Try a Generic Slave but any real patching a good grasp of ASM is required - That's why I don't code Slaves
|
17 April 2020, 09:25 | #8 |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
|
17 April 2020, 10:03 | #9 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
multiple disks => more complicated install script. But install script is only the easy & tedious part (except in some cases where you have to code a RawDIC slave or figure out the layout of bitmap disks.
If you're patching an installable game (with executable), modifying a generic kick slave may do the trick. Sometimes you just need to add some assigns. But if you want to patch something in the executable, you'll have to disassemble it (with ira -a, see ira tutorial on eab http://eab.abime.net/showthread.php?...l+ira+tutorial), debug the code while it's running and figure out what to change, then relate the code to executable segment offset If the executable is packed, you have to use xfddecrunch in the install script to decrunch it, or unpack in slave and install a hook to be called back when the code has been unpacked. There are tons of slaves, most of my slaves have source, Stingray ones too, CFOU! .... I did a lot of DOS-compatible/kickemu ones. For instance Microprose or Sierra, Lucasfilm titles. Check those, and use a working version/disassembly. I can provide enhanced disassembly for most games I've patched. Then you can create a patchlist and use resload_PatchSeg. Piece of cake after doing that for 25 years, I know |
17 April 2020, 10:33 | #10 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
- use the Kickstart 1.3 emulation code, load the game using LoadSeg and, if you're lucky, the game might already work without any further patches. - if you might want to have a bit more of a challenge you can also try creating a patch without using the Kickstart emulation code, you would have to load the game using resload_LoadFile, then you need to relocate the executable using resload_Relocate and you also need to patch/remove all OS calls in the code (AllocMem, OpenLibrary etc.). I wouldn't really recommend this for a beginner but it's always worth to try things. Last edited by StingRay; 17 April 2020 at 10:39. |
|
17 April 2020, 12:36 | #11 | ||
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Quote:
Quote:
Last edited by emuola; 17 April 2020 at 12:43. |
||
17 April 2020, 13:18 | #12 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
Quote:
|
|
17 April 2020, 14:04 | #13 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Not true! Any and all OS functions can be emulated and I have done this in numerous patches as I don't really like patches which require Kickstart emulation. And usually, in the case of games or demos which disable the system, there aren't many OS calls. |
17 April 2020, 14:40 | #14 | |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
Stingray, 20 years ago, I have written intuition library & graphics library emulation routines with OSEmu, implemented overlay loading with dos.loadSeg (Try to emulate overlayed executables for instance. it's horrible to do. And resload_Relocate isn't going to help a bit), added fastmemory support, added a lot of stuff, but still some games proved incompatible, and there were sometimes some strange lockups/issues, and endless hours of debugging. It allowed me to learn a lot about the OS, but it was also exhausting and frustrating.
When kickemu came up, it made those patches so much easier it wasn't worth maintaining an alternate and not reliable version like OSEmu. I know Psygore has his own osemu code that he sometimes links to his slaves. But since he never releases his sources it remains a mystery... My notes about Maniac Mansion switch from OSEmu to kickemu: Quote:
And there are numerous cases where the games open an intuition file selector for instance. Good luck reimplementing that. I agree with you that with most action/arcade games it's more doable (specially ones that kill the OS in the floppy version but use the OS in the CD/AGA version). But frankly I prefer providing more games to people / adding joypad controls to slaves than reducing memory usage by 256kb and spend 5 hours more patching os calls. Don't worry, we get along very well with Stingray, it's just that we have diverging interests sometimes, and we'll have to agree to disagree on that point. Last edited by jotd; 17 April 2020 at 14:49. |
|
17 April 2020, 15:07 | #15 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
I am referring to your "only possible for dos.library mainly" statement and that is, plain and simple, incorrect!
It of course doesn't make sense to emulate OS calls for 100% system-friendly games/demos. For all other cases it just is a matter of how much time one is willing to spend emulating OS stuff. So regarding that, we actually do not disagree at all. The game in question does kill the system and bangs the hardware directly which was the sole reason I suggested trying to do it without Kickstart emulation. |
17 April 2020, 19:18 | #16 |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Hmm.
I disassembled the game (only one big file really) and found e. g. this in the start. Code:
ABSEXECBASE EQU $4 CIAB_PRA EQU $BFD000 CIAA_PRA EQU $BFE001 CIAA_SDR EQU $BFEC01 HARDBASE EQU $DFF000 VPOSR EQU $DFF004 VHPOSR EQU $DFF006 JOY1DAT EQU $DFF00C POT1DAT EQU $DFF014 DIWSTOP EQU $DFF090 DMACON EQU $DFF096 INTENA EQU $DFF09A INTREQ EQU $DFF09C BPLCON3 EQU $DFF106 SPR0DATA EQU $DFF144 COLOR00 EQU $DFF180 BEAMCON0 EQU $DFF1DC EXT_0011 EQU $DFF1FC |
17 April 2020, 19:37 | #17 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Those are hardware registers which you don't need to care much about except for BEAMCON0 (mostly used to switch between PAL/NTSC) as writes to this register have to be patched/removed for WHDLoad.
|
17 April 2020, 19:51 | #18 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
seems that you're using IRA. Good choice. But which version are you using?
because this EXT_0011 EQU $DFF1FC suggests that the version is old (it's FMODE address) Looks that this is a game which is PAL/NTSC and also AGA aware. But whdload already starts with "degraded" ECS by default. You may also use my cheapres.py post-processor for IRA (in https://github.com/jotd666/amiga68ktools) to try to put a name on some/most OS calls, and also custom register offsets. Really helps to see what's going on. You need a modern machine with python installed on it. If you can't, send/zone your executable I can try to process it myself. |
17 April 2020, 22:04 | #19 |
Moderator
Join Date: Nov 2001
Location: Germany
Posts: 866
|
I would recommend to use an interactive Reassembler like ReSource. With that you can more easily follow the code paths and learn how a program is working. IRA is good for quickly disassembling a program but less suited to understand a more complex code structure.
|
18 April 2020, 14:14 | #20 |
Registered Whdload user
Join Date: Oct 2006
Location: Finland
Age: 48
Posts: 532
|
Thanks for the tips and help guys
My IRA version should be the latest available. I also downloaded the demo version of the ReSource. Haven't really tried it seriously yet. I also started to think about Winuae debugger, that could be a valuable tool? Or am I somehow completely on a wrong track here? The main game file is in the Zone now (fred). My appreciation to you Whdload experts has risen at least 1000% in the last few days Last edited by emuola; 18 April 2020 at 14:33. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with creating Slave (for Journey to the center of the earth). | puppe | project.WHDLoad | 8 | 16 January 2016 21:53 |
Creating an empty hdf file | Harko33 | support.WinUAE | 1 | 25 September 2011 23:46 |
WinUAE WHDLoad Install Problem | Kitty | project.WHDLoad | 97 | 29 September 2009 04:16 |
whdload game install problem | Unregistered | New to Emulation or Amiga scene | 4 | 23 September 2005 22:38 |
problem install games using whdload | Unregistered | New to Emulation or Amiga scene | 2 | 16 December 2004 11:17 |
|
|