steelie@pro-charlotte.cts.com (Jim Howard) (01/21/88)
What would be the procedure to place for example an 8k compiled program in the boot block on the amiga disk? No, this isnt for writing a virus or anything, I just would like to know the procedure so I can put a program to disable fast ram and stuff on games that dont like the extra memory. Do I boot up sectorama and copy the entire file byte by byte into block 0 or what? And do I have to change the header on the data to anything different? And as a final note, dont hit me over the head with a rom kernal manual, Ive already found it to be impossible to understand on this specific subject. UUCP: ....!crash!pro-charlotte!steelie | Pro-Charlotte - (704) 567-0029 ARPA: crash!pro-charlotte!steelie@nosc.mil| 300/1200/2400 baud 24 hrs/day INET: steelie@pro-charlotte.cts.com | Log in as "register"
steveb@cbmvax.UUCP (Steve Beats) (01/23/88)
In article <2390@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes: >What would be the procedure to place for example an 8k compiled >program in the boot block on the amiga disk? No, this isnt for >writing a virus or anything, I just would like to know the procedure You can't put an 8K program onto a 1K boot block. The system bootstrap s/w in the Amiga only reads the first 2 sectors off a floppy before calling it for execution (if the checksum is OK, see other postings on this subject). My suggestion is that the code in your custom boot block reads another 16 sectors into memory and executes those before returning to the strap code. However, here's the rub, if a game autoboots via the startup-sequence then you can just run NoFastMem before the game, right? If a game autoboots by putting custom code in the boot block, chances are it checks this code for protection purposes too. You go altering it and your game ain't gonna go! Oh yeah! I just thought about something else too. You said a 'compiled' program. That means you're going to have to do all the relocation stuff because a compiled program is pretty darned sure to be position dependent. In addition to this, it is probably expecting DOS to be up and running (which it isn't this early in the boot sequence) and will want things like default input and output streams. The only 'simple' way to get this working is with position independent assembler. In short; it ain't so simple. Steve
steveb@cbmvax.UUCP (Steve Beats) (01/23/88)
In article <3181@cbmvax.UUCP> steveb@cbmvax.UUCP (Steve Beats) writes: >In article <2390@crash.cts.com> steelie@pro-charlotte.cts.com (Jim Howard) writes: >>What would be the procedure to place for example an 8k compiled >>program in the boot block on the amiga disk? No, this isnt for >>writing a virus or anything, I just would like to know the procedure > > [loads of junk from me that was completely off the subject] > > Steve OK, OK! I just re-read my posting and realised that I didn't answer the question :-( PUTTING the program onto the boot block (and subsequent blocks) is real easy. Just open the trackdisk device, read your program file into memory, write the memory out to the disk sectors. You would have to write a small program to do this but it's relatively simple. I'll leave the old (erroneous) posting though because I think it illustrates why you wouldn't want to do this anyway. I have a good excuse; I found a great little bar out in the boonies last night. Beer was 56 cents a glass! Strangely enough, I spent as much money there as I would at a yuppie bar selling beer for $1.50. Boy do I feel rough today :-( Steve