2k intro boot...
I just want to ask your help for something I always have been wondering about for many years...
let's get to it: Assuming I have any 2k executable intro and want to experience how to write it into the bootblock can I do this job with the ASM-One/ARIII or do I need any special tool? Sorry to ask, but I am in the dark..... |
Quote:
I have no idea if there is a special tool, but if you want I will do it for you ;) |
Quote:
Then ... assuming I have a 1k code to jam into the bootblock sectors ... how can I do this? |
Quote:
|
Quote:
|
Ok, two possibilities:
1) the exe is fully pc relative, so you do not need to relocate it. Simply strip the header (at start and end of the binary). Then assemble: Code:
bb: 2) relocate the exe at some fixed location. Then: Code:
bb: |
Quote:
To simplify it: if you have a single-section executable the header will be 32 bytes, which you can skip. But then you lose this space in the boot block. Code:
bb: |
For asm-one:
1. use this source: Code:
start: 3. load exe into memory with RO, you will get its memory location, say it's X 4. copy exe with C (beg is X, end is X+1024-12, dest is exe_code) 5. write bb to disk as 2 sectors with WS (ram ptr is start, disk ptr is 0, length is 2) 6. calculate bootblock checksum with CC Edit: Forgot to mention, you can simulate bootblock with BS (beg is start). |
1 Attachment(s)
A real example: "It's a sin" by Planet Jazz.
It's a 1KB bootblock intro with source code available, full PC relative. I chose this because I took the opportunity to fix some small bugs that prevents it to exit to CLI regularly. Greeting to the original coder :) Code:
;Planet Jazz - It's a sin bootblock for Datastorm 2017 Just noticed two small inaccuracies in the copper list. But the purpose was a bb intro example so it doesn't matter :p |
Thank you so much ross! ...
Anyway I started the .adf with WinUAE and of course it works, but ... trying to figure out how things have been done ... I opened, with ASM-One, the source file you attached "pjz-its_a_sin.s" and once assembled I haven't been able to execute anything. Can you, ... please ... , give me/us more help telling ... how to start it and how to (maybe step by step) end up writing it into and .adf disk boot block? It would be nice to to have the file pjz-its_a_sin.adf like the one you attached. I have greatly appreciated your work for this bb intro example ... |
Load and assemble the source.
Then: WS RAM PRT>BB DISK PTR>0 LENGTH>2 CC What did you do in practice: WS -> write assembled code to disk starting from routine at BB (DC.B 'DOS',0 etc.) at disk sector 0 (where bootblock reside) length 2 (self explanatory :)) CC -> calculate checksum (fill the second long -> DC.L 0 with the right value) [if you wonder what the third longword DC.L $370 is, is the disk rootblock, sector 880] Now if you boot the disk code start from offset $c, the START label. Enjoy! :great |
http://aminet.net/package/dev/asm/Asm_course There is a Assembler course on aminet. It comes with Asm One and it comes with example code.
Read /examples/BootBlock.S But it pretty much is as Ross says. |
Quote:
Thanks to to ross and you too! :great |
Hello... remaining in the topic of boot block tutorial, I made tonight another experiment...
Here is the code of a flashing screen waiting for the left mouse button to execute a custom boot block: Code:
do you guys have any clue? |
what is the "dcb.b 1024,0" ?
the code is after the boot with that so not copied to disk... loop should be just after dc.l $370 |
Code:
bb: |
Quote:
I do not how to arrange this last step.... |
Nothing to arrange here :)
You simply need to type CC and ASM-One will generate (and write to inserted ADF, or DF0: in a real machine) the correct checksum on the disk. Then you can boot the disk and the code in the bootblock starts. |
Quote:
ross ... what I doing wrong? .... The disk just created on which I wrote the bb won't boot ... :crying |
Quote:
Notice the commented code. I assure you that it works. |
All times are GMT +2. The time now is 03:06. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.