English Amiga Board


Go Back   English Amiga Board > Other Projects > project.WHDLoad

 
 
Thread Tools
Old 07 May 2024, 08:13   #1
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
Slave ASM and compile

Hello. I’m novice compiling Slaves for WHLoad. I want to create my own Slaves. Also I see in WHLoad there are for each element a source code and I would like to test compiling by my self and create. mine. I understand assembly language. What I don’t know is what I need to install to be able to compile for example the source .asm for the Slaves? I can do in PC or must be in Amiga OS only? If in Amiga I need to install the WHLoad developer version? I have a computer with AMIKIT and runs fine that is why I ask I would not like to remove the version is actually running as runs fine, but that is why I need and what compiler does the job to convert to executable?


Thank you
field3d is offline  
Old 07 May 2024, 09:09   #2
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
cross compile with vasm on windows or linux it works great. You'll need amiga includes besides whdload.i
jotd is offline  
Old 07 May 2024, 15:45   #3
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
Oh I see he whload.i is in developer file of whload. Where I copy the file in Windows? I will check vasm.
field3d is offline  
Old 07 May 2024, 18:42   #4
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Getting a proper setup is half the challenge YMMV, and you should adjust to fit your own needs, but I use a setup inspired by what JOTD does.

I have a WB 3.1 installation in a "whdloaddev" folder where I have all slave sources, whdload etc. and a couple of WinUAE configurations that boot from that directory (one with JIT for fast iteration, and one with 060+MMU for proper debugging). WHdload dev package is installed in SYS:WHDLoad, system include in includes/NDK_3.9, you get the idea. S:user-startup starts the slave I'm working on.

Then for e.g. this slave (http://www.whdload.de/demos/Altair_ZenerDrive.html) I have SYS:ZenerDrive w/ disk.1 and ZenerDrive.slave. In SYS:ZenerDrive/source I have ZenerDrive.s and a Makefile (and git repo, neither published) like this:

Code:
PROGNAME = ZenerDrive
HDBASE = c:\path\to\whdloaddev
WHDBASE = $(HDBASE)\WHDLoad
WHDLOADER = $(PROGNAME).slave
SOURCE = $(PROGNAME).s
CONFIG=whdload-test.uae
#CONFIG=whdload-test-jit.uae

all : $(WHDLOADER)

$(WHDLOADER) : $(SOURCE) Makefile
	date > datetime
	vasmm68k_mot -pic -x -DDATETIME -I$(HDBASE)/includes/NDK_3.9/Include/include_i -I$(WHDBASE)/Include  -I$(HDBASE)/includes -I$(WHDBASE) -I$(WHDBASE)/Src/sources -nosym -Fhunkexe -o $(WHDLOADER) $(SOURCE)

test: $(WHDLOADER)
	cp $(WHDLOADER) ..
	cmd /c start c:\tools\winuae\winuae64.exe -config=$(CONFIG) -G
paraj is offline  
Old 07 May 2024, 19:26   #5
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
the above looks VERY familiar
jotd is offline  
Old 07 May 2024, 19:44   #6
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Quote:
Originally Posted by jotd View Post
the above looks VERY familiar
Learned from the best Maybe I/we should make a proper tutorial for getting started. Using whdload for debugging (as you know) is very useful even if you don't plan to make a slave for public release, and getting the setup going and first wrangling of "generic" kick13/31 is not so easy, but once you're setup it's golden.
paraj is offline  
Old 07 May 2024, 20:30   #7
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
Oh wonderful now is all clear. I think vasm is wonderful. I used recently Ghidra to check some of my old programs I didn’t remember and is amazing too but vasm I see is a magnum for the compilation. Thank you for the help.
field3d is offline  
Old 07 May 2024, 20:50   #8
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,146
Quote:
Originally Posted by field3d View Post
Oh wonderful now is all clear. I think vasm is wonderful. I used recently Ghidra to check some of my old programs I didn’t remember and is amazing too but vasm I see is a magnum for the compilation. Thank you for the help.
Great! Feel free to ask more questions as there probably small tips you can benefit from that feel implicit when you've done this a bit. Like the offset between what you're usually seeing in ghidra and what you need to use for patch lists etc.
paraj is offline  
Old 08 May 2024, 01:53   #9
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
I’m testing and I configured all. Appears not a problem. I just have an issue. I see the demo you mention ZenerDrive the WHDLoad asks lvo/dos.i also lvo/graphics.i I have the NDK 3.9 for amiga and it doesn’t comes there the lvo/dos.i and lvo/graphics.i where can I download that libraries or the full NDK complete? I see that dos.i is inside dos directory lvo/graphics.i I can’t find. Where can I download that NDK include libraries?

Last edited by field3d; 08 May 2024 at 03:47.
field3d is offline  
Old 08 May 2024, 05:02   #10
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
I noted what is missing in some. The kick13.s asks for the lvo/graphics.i that one I can’t find anywhere. Any place to find that library?
field3d is offline  
Old 08 May 2024, 09:02   #11
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
will zone those for ya
jotd is offline  
Old 08 May 2024, 09:05   #12
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
I dont remember exactly, it was many years ago.
But many old includes/sources dont use LVO/ as directory.
LVO dir was created perhaps when kick 3.0 was created.
Try graphics/graphics.i and copy to LVO dir or modify kick13.s file and change path for lvo/graphics.i to correct.
Don_Adan is offline  
Old 08 May 2024, 09:51   #13
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
I remember that those files are somehow non standard. All other files with structures & defines & all are standard but those ones appear in different formats. Either big LVO file of all known libs or separate files. Zoned them.
jotd is offline  
Old 08 May 2024, 12:29   #14
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,629
Great question field3d!

Quote:
Originally Posted by paraj View Post
Learned from the best Maybe I/we should make a proper tutorial for getting started. Using whdload for debugging (as you know) is very useful even if you don't plan to make a slave for public release, and getting the setup going and first wrangling of "generic" kick13/31 is not so easy, but once you're setup it's golden.
It would be very cool with a dedicated .hdf (or maybe even better, .zip of complete system image) with everything set up and working!

Then ppl who know how to code could at any time just fire that up, make the changes, and compile a new version. It would be a dream... especially for me as I've recently asked for more "button 2 instead of up to jump" (and in general full 3-button support if useful) slaves.

Maybe it could be done as a pinned, community effort thread with that as result? Then the first game I would patch would be Paradroid 90!! (The long-press in that game really hurts the gameplay and idea of the game - way too easy to "mis-click" = game over.)
Photon is offline  
Old 08 May 2024, 13:22   #15
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
This can't really be HDF, unless you want to use barfly on WinUAE to build slaves (which is still possible, but I've stopped doing that since around 2015)
jotd is offline  
Old 08 May 2024, 13:28   #16
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,629
Quote:
Originally Posted by jotd View Post
This can't really be HDF, unless you want to use barfly on WinUAE to build slaves (which is still possible, but I've stopped doing that since around 2015)
Cheers jotd, yeah it doesn't have to be .hdf. But since getting a slave to compile depends to a large extent on the right WHD environment set up, and paths to include files and tools used to compile being correct, it would save a lot of time to have this as a prepared file/folder structure archive.

Maybe something akin to ClassicWB could be done, but as a .zip and KS/WB stuff provided by the user on a blank harddisk or harddrive directory?

I.e. freshly installed 3.1 Amiga, unzip this to root and it puts everything in the proper place? (Mostly to save writing an installer script, which would obviously be even better - as long as it doesn't "stop on something" too easily.)

The goal, then, to have a clean volume dedicated to only working on slaves. Maybe there's already a repo that does this? (Or for that matter, a tutorial thread already from a decade ago?)
Photon is offline  
Old 08 May 2024, 13:41   #17
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
Yes I can modify no problem it works as Python the problem is I can’t find the graphics.i that lick13.s asks or exists with other name? I tried to search in internet in bel 3.9, 3.2 and a lot of places and nothing refers me to a graphics.i. The other .i I could find but graphics.i nop. Where can I download it that file? Or maybe if has other name in the ndk 3.9 or 3.2?
field3d is offline  
Old 08 May 2024, 14:13   #18
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 2,006
Seems that was called graphics_lib.i previously:

https://github.com/deplinenoise/amig...graphics_lib.i
Don_Adan is offline  
Old 08 May 2024, 14:40   #19
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
Oh that one I just rename from lib.i to .i and that’s all?
field3d is offline  
Old 08 May 2024, 14:48   #20
field3d
Registered User
 
Join Date: Feb 2019
Location: USA/Texas
Posts: 36
I renamed that library to .i and I have these errors:

error 23: undefined symbol <_LVOFreeMem>

error 23: undefined symbol <_LVORemove>

error 23: undefined symbol <_LVOAddHead>

error 23: undefined symbol <_LVOAddTail>

error 23: undefined symbol <_LVOAllocMem>


Any idea? Is possible that graphics.i is another version or other thing.

I think is needed the graphics.i in specific. For example the same happened with dos_lib.i is different of the file dos.i. I compared both files and totally different. And dos.i I could find there are many versions. But graphics.i I can’t find it yet. Is a requirement for the kick13.s is not the game I mentioned is the real kick13/s who requires that library then any place to find it or what can I replace?

Last edited by field3d; 08 May 2024 at 15:30.
field3d 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
ASM: Asm-ONE or AsmPro - how to set a Hello amiga coders, I hope it is ok to hijack ? Fireball Coders. Asm / Hardware 3 08 May 2024 13:35
Tool to convert asm to gnu asm (gas) Asman Coders. Asm / Hardware 13 30 December 2020 11:57
Help with compile JimDrew Coders. Language 23 30 October 2014 22:42
Trying to compile some ASM in StormC V4 NovaCoder Coders. General 2 29 September 2009 01:44
WHDload ASM Slave Retro1234 Coders. General 21 27 October 2008 13:20

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 07:46.

Top

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