English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 28 November 2021, 03:49   #1
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
WHDLoad GenericKick error

It was suggested to me here that I should make a WHDLoad slave for my Turrican 2 AGA project, to make use of its crash reporting and possibly find a bug that affects only higher end CPUs.

Searching this forum for information led me to download the GenericKickHDDev package. I've made my game a single file (exe + data all in one), and I setup the ROMs/RTB files, then I try to launch my game with:
WHDLoad GenericKick31.slave PRELOAD CUSTOM="MyGame.exe"

I get an error:
DOS-Error #212 (object is not of required type) on PreLoad for Examine on object "Work:Incoming".

Work:Incoming is the folder I'm running this from, and contains MyGame.exe. Omitting the PRELOAD in the WHDLoad command line gives the same error.

I had the 212 error with my ROM files initially, but used protect to fix the types on those files. This error though seems to be related to the folder, and its not clear to me what it means. Can anyone help?
Muzza is offline  
Old 28 November 2021, 07:17   #2
Aladin
Registered User
 
Join Date: Nov 2016
Location: France
Posts: 853
Demo World 3 work with Workbench31_32.Slave and Workbench31_4.Slave
Aladin is offline  
Old 28 November 2021, 09:51   #3
Solo Kazuki
Registered User
 
Solo Kazuki's Avatar
 
Join Date: Sep 2004
Location: Poland
Posts: 1,301
Quote:
Originally Posted by Aladin View Post
Demo World 3 work with Workbench31_32.Slave and Workbench31_4.Slave
Sorry, but not for all generic slave is remedy, as OP mentioned it could have problems with faster CPUs. Many of Your generic versions didn't work with my config (full M68060) and if it's possible best is using dedicated versions, because they works in 99% of cases.

Weird thing is that some of these generic versions which didn't work are actually working when You enter to "data" directory and run them normal way...
Solo Kazuki is offline  
Old 28 November 2021, 09:56   #4
Lisko
Registered User
 
Join Date: Mar 2021
Location: Avellino, Italy
Posts: 170
Quote:
Originally Posted by Solo Kazuki View Post
Sorry, but not for all generic slave is remedy, as OP mentioned it could have problems with faster CPUs. Many of Your generic versions didn't work with my config (full M68060) and if it's possible best is using dedicated versions, because they works in 99% of cases.
Yes but Muzza want to start using a generic whdload slave for private use to debug his code because whdload offers advanced crash reports and advanced debug features compared to the plain OS
Lisko is offline  
Old 29 November 2021, 06:40   #5
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
Quote:
Originally Posted by Aladin View Post
Demo World 3 work with Workbench31_32.Slave and Workbench31_4.Slave
Thanks. Unfortunately I now get "Can't allocate ExpMem". My expansion is only 4MB, and 1.6MB seems to go on 'something' when loading Workbench, so I guess I don't have enough. Me from the 90s knew how to do every trick to maximize RAM in Workbench.

I tried Workbench31_1.slave, but it gives the same 212 error as my original post.
Muzza is offline  
Old 29 November 2021, 09:44   #6
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
I created slaves for my games.

Configure proper chip/fast memory. Require AGA.

Don't fiddle with VBR or caches in your exe. In my case, I pass a special argument so the game knows if it's running under whdload or not, and uses normal file operations or whdload ones. But it may be too much work in your case.

I can prepare it for you if you want. Tell me where to download the latest .adf of your game.
jotd is offline  
Old 29 November 2021, 12:02   #7
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
I used special WB31 slave, not generic slave. Generic slaves are mostly for adf (disk images). I used slaves for HD directory. Much universal for me. I can copy every program/library etc to this directory. After running this slave it works as small HD. And from this small HD i called/running (via icon or from CLI) program which i want to tests.

Edit, about memory size. I have 8MB fast ram. Then i can set 4MB as ExpMem. If you have only 4MB of fast then perhaps for AGA, you can set only 1MB ExpMem and no preload.
Don_Adan is offline  
Old 01 December 2021, 22:51   #8
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
I decided to learn how to make my own slave, given it may be something I need to do multiple times. I have been making progress, but I'm confused about how RAM is handled by WHDLoad.
I fill in ws_BaseMemSize and ws_ExpMem with the amount of chip and fast RAM I want, and WHDLoad replaces those values with the addresses of the allocations. I have my own allocator so that the game will only allocate within those regions.

However, when it comes to loading the executable file, I had assumed the calls to resload_LoadFile should load the exe into one of the pre-allocated memory regions. However, all the samples I find use an absolute address. Oscar slave uses $400 as the address to load the exe into. How does this absolute address work in relation to ws_BaseMemSize / ws_ExpMem?

Also the value I'm getting back in ws_ExpMem is suspicious. I get 0x43df7000 on a 64MB emulated system. Is this to be expected?
Muzza is offline  
Old 01 December 2021, 23:05   #9
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
Your game uses DOS calls to load files. Oscar does not, and all floppy calls are patched with fixed offsets.

Don't use LoadFile() use LoadSeg() see kickemu examples. For instance source of Microprose games or Titus or TFX, or Syndicate..., or a lot of others. I've created dozens of kickemu slaves. Or adapt a generic kick slave.

If you create several versions of your executable you'll have to change offsets in the slave again and again with that approach.

And yes expsize is replaced by the mem start but not chipsize. It remains what it is, starts at 0 no matter what.

0x43df7000 on a 64MB emulated system is fine
jotd is offline  
Old 01 December 2021, 23:12   #10
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
The version I'm using for this WHDLoad slave doesn't use DOS, it is just a single large file that is both exe/data.
Muzza is offline  
Old 01 December 2021, 23:15   #11
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
I'm not clear on how the kickemu slaves work, but I was put off because it appears they need kickstart ROMs to function. Doesn't this mean extra RAM requirements? And it adds to the difficulty of distributing it to testers.
Muzza is offline  
Old 01 December 2021, 23:35   #12
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,161
Yes it takes 512k more RAM to load kick 3.1, 256K for 1.3

But you don't need to distribute the kickstart to testers. They already have it installed if they
use whdload.

Best way if you're writing the game: don't use kickemu, but resload_Relocate to load program segments. And pass an argument to your program to tell that you're using whdload (also pass resload in a register).

https://github.com/jotd666/pacman500...src/PacmanHD.s

then if you're using whdload, use resload_LoadFile to load your files else use the OS.

That's what I do.
jotd is offline  
Old 01 December 2021, 23:51   #13
Muzza
Registered User
 
Muzza's Avatar
 
Join Date: Sep 2019
Location: Sydney
Posts: 357
Thanks, its running now. It was the chip RAM always starting at zero that I'd missed.
Muzza 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
WHDLoad Error Knight94 support.Games 10 07 December 2014 23:07
WHDLoad error: error during 'resload_LoadKick' on monkey island & others jamespstevenson project.MAGE 14 20 February 2014 05:33
WHDload error? neil324 project.MAGE 4 01 July 2009 21:53
WHDLoad error Black Wolf support.WinUAE 15 13 March 2006 21:19

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 19:02.

Top

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