05 January 2024, 02:10 | #21 |
Engineer
Join Date: Oct 2018
Location: Shadow realm
Posts: 168
|
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. |
05 January 2024, 02:31 | #22 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,033
|
Quote:
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. |
|
05 January 2024, 02:50 | #23 | |
Engineer
Join Date: Oct 2018
Location: Shadow realm
Posts: 168
|
Quote:
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. |
|
05 January 2024, 03:09 | #24 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,033
|
Quote:
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. |
|
08 February 2024, 04:59 | #25 | |
Engineer
Join Date: Oct 2018
Location: Shadow realm
Posts: 168
|
Quote:
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. |
|
08 February 2024, 12:21 | #26 | |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,033
|
Quote:
Consider that no-one did it tells you all you need to know. We done now? |
|
08 February 2024, 13:59 | #27 |
Engineer
Join Date: Oct 2018
Location: Shadow realm
Posts: 168
|
|
08 February 2024, 14:43 | #28 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,033
|
|
08 February 2024, 14:50 | #29 |
Engineer
Join Date: Oct 2018
Location: Shadow realm
Posts: 168
|
|
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 |
|
|