23 January 2006, 19:48 | #1 | |
Moderator
|
help writing an whdload install for Brian the Lion Demo needed
i´ve tried to write a slave to support the demo version of Brian the Lion months ago...maybe Codetapper remember this, after i asked for some help.
but i didn´t really understand what the bootprog really do... now i´ve restarted it and it seems that i´m still too stupid for it... first i reassembled the bootblock, without the first 12 bytes (disktype, checksum, rootblock pointer) this is what i´ve already understand: Quote:
Last edited by Joe Maroni; 24 January 2006 at 17:56. |
|
23 January 2006, 20:47 | #2 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Moved to coders/tutorials as I feel this may turn into a tutorial on WHDInstalling
|
23 January 2006, 20:51 | #3 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
|
What is it with Tutorials. Ok, I'll do a DD2 tutorial in a Carrier Command Style!!!!!
|
23 January 2006, 20:53 | #4 |
Moderator
|
yeah...that´s right...
@ all advanced assembler coders please don´t laugh....it´s really hard for me to understand...especially the indirect adressing modes... in my eyes i would understand the command as: LEA 322(A6),A6 ; load effective adress at position $4 + $142 into A6 but Codetapper gave me the advice that this is a memory test... assembler is so hard to understand.... Last edited by Joe Maroni; 23 January 2006 at 22:09. |
23 January 2006, 20:54 | #5 | |
Moderator
|
Quote:
many many thanks... |
|
23 January 2006, 21:12 | #6 | |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Quote:
|
|
23 January 2006, 22:30 | #7 | |
Moderator
|
Quote:
maybe we should first lear nsome methods what is possible with assembler... getting into SV mode can be done in more than one way AFAIK, but how does those methods look like...??? 1. Permit() after "open" the exec.lib is the first 2. disable some interrupts is another method 3. do a TRAP #x (x <- Trap vector) is another one (causes an exception) and all this stuff is very hard to understand.... Last edited by Joe Maroni; 23 January 2006 at 22:37. |
|
23 January 2006, 23:17 | #8 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
Well from a book I have it gives the following code for getting into the supervisor mode
Code:
Execbase =4 ;Execbase address SuperState =-150 ;Turn on function ... move.l Execbase,a6 ;Execbase address into a6 jsr SuperState (a6) ;Turn on supervisor mode move.l d0,savesp ;Save return value ... savesp:blk.l 1 ;Space for SP Value |
24 January 2006, 06:29 | #9 |
Moderator
|
Execbase is always $4
LVO for Superstate is -150 first you move the execbase into A6 (library bases must ever be in A6 if you call any functions of them !) then you jump to subroutine "Superstate" this function returns the old user stack (supervisor has its own stack !) in D0 to save it for later use you put it with a move to variable "savesp" that´s how i would understand it... more details: it is allowed to change from supervisor mode into user mode but not in the other direction... the function "superstate" just causes an exception and then jumps to the routine that starts at $020 (vector $08) BTW: first post edited.. Last edited by Joe Maroni; 24 January 2006 at 07:38. |
24 January 2006, 11:46 | #10 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
|
I would advise that you ditch IRA for now and use Resource for disassembly. It has the advantage that when you are looking down the list and you see execbase (4) in register a6, you can press "e" (for exec) and it will change the hex offset into human readable form. When it gets into lists, you can use the symbols features to tell Resource that it is a memlist and it will auto-comment the code.
Ditto with anything involving the DOS and graphics library functions - hit "d" and "g" respectively. "h" for any hardware references etc. It will help a great deal while learning this stuff! |
24 January 2006, 17:31 | #11 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
x_to: I don't mind scanning in the article from this asm book I have.. I'll scan the few pages and OCR them
The book is also available on an LSD doc disk and I'll up the article to the zone if you require it |
24 January 2006, 17:40 | #12 | |
Moderator
|
Quote:
not necessary...i already have tons of books here at home... BTW: it would be nice if someone of the advanced coders can check the stuff in the first post...i hope i explained everything right...i´m not sure myself... Last edited by Joe Maroni; 24 January 2006 at 20:26. |
|
24 January 2006, 18:12 | #13 |
Zone Friend
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 424
|
Supervisor
Here is an bootblock that moves itself to the upper
memory, entering the supervisormode via privilege violation and moving a mini(crap) prog to $300 and jumps in.. Code:
go: dc.b "DOS",0 dc.l 0 dc.l "HOL." move: lea start(pc),a0 lea $7fc00.l,a1 ;move to $7fc00 move.l a1,a4 move.w #end-start,d0 trans: move.b (a0)+,(a1)+ dbf d0,trans jmp (a4) start: lea $dff000,a6 ;stop interrupts move.w #$7fff,d0 move.w d0,$9a(a6) move.w d0,$96(a6) move.w d0,$9e(a6) move.w d0,$9c(a6) lea $bfd100,a5 move.b #%10000001,(a5);Drive select turn off drive motors nop ;wait a bit nop nop move.b #%11111001,(a5);select all move.l $20.w,a5 ;privilege violation memory vektor adress-> rescue it lea super(pc),a4 ; move.l a4,$20.w ;move own address to $20 (privilege violation vektor) super: move.w #$2700,sr ;call an violation(usermode) ;(writing to the sr in usermode is a privilege violation) ;and enters the supervisor mode ;$20 points here ..continue here in supervisor mode ;and set the status register move.l a5,$20.w ;write back old $20 Vector;(Vector number is 8) lea $0000c0.l,a7 ;now SSP Supervisorstackpointer lea $000200.l,a0 ;set userstackpointer move.l a0,usp ;don´t know if this is nescessary.... ;dosomestuff.... move2: lea trap(pc),a0 ;move to $300 lea $00300.l,a1 move.l a1,a4 move.w #end-trap,d0 trans2: move.b (a0)+,(a1)+ dbf d0,trans2 jmp (a4) ;jmp to $300 trap: move d0,$dff180 ;blinken addq #1,d0 btst #6,$bfe001 beq.s ende bra.s trap ende: rts ;crash...... end: Last edited by NOB; 23 January 2007 at 21:02. |
25 January 2006, 10:06 | #14 |
move.w #$4489,$dff07e
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
|
Is there a doc for ReSource somewhere... I don't know half of the options
|
25 January 2006, 10:45 | #15 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
|
Resource v1 had a nice example disassembling a program, LoadWB or some AmigaDos command like that. I learned a great deal from that doc! I think it might also be on one of the LSD docs disks. I'd have to dig it out to see if I have it, maybe someone else will beat me to upload it?
|
25 January 2006, 12:23 | #16 |
Registered User
Join Date: Sep 2005
Location: melbourne
Age: 55
Posts: 541
|
seems an index for the LSD Docs Disks has been on here previously, according to this thread: http://eab.abime.net/showthread.php?t=13919
All of the LSD Docs Disks appear to be online here: http://borrowedtime.emuunlim.com/lsd/index.htm so I downloaded disk 65, and luckily there's an index included on the disk - LSD Docs Disk #7 has the Resource docs, so I'm downloading it now to see if I can extract the powerpacked file and save it as a standard text file for easier reading on IBMs (no powerpacker compatible decruncher that I'm aware of). Gizmomelb EDIT: the file is in the Zone - both as an Amiga PowerPacked file and in plain text for Windows users. Last edited by gizmomelb; 25 January 2006 at 12:53. |
25 January 2006, 18:26 | #17 |
move.w #$4489,$dff07e
Join Date: Sep 2005
Location: Norfolk, UK
Age: 42
Posts: 2,351
|
Looks like a great doc - thanks guys
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Brian The Lion v1.3 - betatest | BoredSeal | project.WHDLoad | 6 | 06 July 2010 00:35 |
Brian the Lion CD³² | mai | HOL data problems | 0 | 14 January 2009 00:02 |
Brian the Lion | haynor666 | HOL contributions | 3 | 11 August 2008 22:47 |
Brian the lion CD32 | laser | request.Old Rare Games | 7 | 21 June 2007 01:11 |
brian the lion whdload version | DeAMI | support.Games | 1 | 02 May 2003 10:32 |
|
|