English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 05 January 2024, 02:10   #21
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Galahad/FLT View Post
I dont get what you mean?
If the concern is that you need your code to run from a certain address, yet the bootblock will be loaded by strap into a non-predictable location, a solution is to put your code wherever you want, set a0 to the address of your code, set d0 to 0, and return from the bootblock.

Then strap wlll free the bootblock and jump to the address you left in a0.
admiral is offline  
Old 05 January 2024, 02:31   #22
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,989
Quote:
Originally Posted by admiral View Post
If the concern is that you need your code to run from a certain address, yet the bootblock will be loaded by strap into a non-predictable location, a solution is to put your code wherever you want, set a0 to the address of your code, set d0 to 0, and return from the bootblock.

Then strap wlll free the bootblock and jump to the address you left in a0.
No.

The bootblock is always predictable. On a clean booted system, it never has and never will load higher than $40000 in chip memory, the only exception is if it loads into fast memory, but that still never interferes with chip mem between $40000-$80000.

The usual way is let the system allocate the bootblock wherever it likes, then read your own boot code from the disk to $40000 or higher, then JMP to that code at $40000, and then transfer your code to its final destination as you are likely dropping the OS for loading and you no longer need to care where the bootblock is as its done its job.

This is obviously for code that only works from a specific memory address, if you wanted to keep everything nice and system friendly, you would be allocating memory properly, relocating code to whatever address was allocated.

But what I would never do, is return from the bootblock back to the system that called the bootblock loading process in the first place, because its simply not needed.
Galahad/FLT is offline  
Old 05 January 2024, 02:50   #23
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Galahad/FLT View Post
if you wanted to keep everything nice and system friendly, you would be allocating memory properly, relocating code to whatever address was allocated.

But what I would never do, is return from the bootblock back to the system that called the bootblock loading process in the first place, because its simply not needed.
If you take the clean path (i.e. allocating memory properly) and you're never going to return to the bootblock after your code runs from elsewhere, why not free it?

Letting the system do it by returning from the bootblock is one way to get this done for you. As far as I am aware, it is a reliable method.

Of course, it is not the only method, and you could argue that it's completely unnecessary to free that memory in the first place. It is just 1KB (if booting from a typical floppy). Regardless, it is 1KB you can't allocate by exec means, as it already is allocated.
admiral is offline  
Old 05 January 2024, 03:09   #24
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,989
Quote:
Originally Posted by admiral View Post
If you take the clean path (i.e. allocating memory properly) and you're never going to return to the bootblock after your code runs from elsewhere, why not free it?

Letting the system do it by returning from the bootblock is one way to get this done for you. As far as I am aware, it is a reliable method.

Of course, it is not the only method, and you could argue that it's completely unnecessary to free that memory in the first place. It is just 1KB (if booting from a typical floppy). Regardless, it is 1KB you can't allocate by exec means, as it already is allocated.
Because what you are proposing is redundant.

If I use non AmigaDOS disk today, its to knock out the system so I can claim ALL memory and have it be as efficient loading on a floppy based Amigas as possible.

Using system friendly code to use the system for all sector loading instead is incredibly wasteful, youve less memory for your actual game and you've just restricted the game to floppy only with none of the benefits of being on a non system using floppy.

Instead you would simply retain an AmigaDOS file loading so that the game can be copied to any drive you like.

Saving 1k seems rather redundant.
Galahad/FLT is offline  
Old 08 February 2024, 04:59   #25
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Galahad/FLT View Post
Because what you are proposing is redundant.

If I use non AmigaDOS disk today, its to knock out the system so I can claim ALL memory and have it be as efficient loading on a floppy based Amigas as possible.

Saving 1k seems rather redundant.
You can indeed do whatever you want (esp. if you pretty much take over the system), but what I explained is the "correct" way, as documented here.

http://amigadev.elowar.com/read/ADCD.../node015A.html

You can still take over all the same, should you wish to, after strap is done with its cleanup.
admiral is offline  
Old 08 February 2024, 12:21   #26
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,989
Quote:
Originally Posted by admiral View Post
You can indeed do whatever you want (esp. if you pretty much take over the system), but what I explained is the "correct" way, as documented here.

http://amigadev.elowar.com/read/ADCD.../node015A.html

You can still take over all the same, should you wish to, after strap is done with its cleanup.
Yawn.

Consider that no-one did it tells you all you need to know.

We done now?
Galahad/FLT is offline  
Old 08 February 2024, 13:59   #27
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Galahad/FLT View Post
Yawn.

Consider that no-one did it tells you all you need to know.

We done now?
There is a correct way to do it.

But as I already told you: You can indeed do whatever you want.
admiral is offline  
Old 08 February 2024, 14:43   #28
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,989
Quote:
Originally Posted by admiral View Post
There is a correct way to do it.

But as I already told you: You can indeed do whatever you want.

And yet zero people did it the "correct" way.

Yeah, we're done
Galahad/FLT is offline  
Old 08 February 2024, 14:50   #29
admiral
Engineer
 
Join Date: Oct 2018
Location: Shadow realm
Posts: 165
Quote:
Originally Posted by Galahad/FLT View Post
And yet zero people did it the "correct" way.

Yeah, we're done
admiral 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
IP address and Winuae White support.WinUAE 44 30 March 2023 11:56
Does anyone know the email address for this site? xboxown support.Other 5 22 December 2021 02:09
Address register expected Nightfox Coders. Asm / Hardware 4 12 August 2016 11:51
NAT address -Rob- support.Other 7 07 April 2008 00:06

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 17:38.

Top

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