hyc@math.lsa.umich.edu (Howard Chu) (04/02/90)
In article <16000032@ux1.cso.uiuc.edu> cs325ec@ux1.cso.uiuc.edu writes: > > > I was wondering if someone could answer two technical questions: > > 1.) 50Hz: Setting 0x448 to something other than zero does not > put the ST in PAL mode, does it? I downloaded hertz.arc > from terminator, but the hertz.tos is non executable, > i.e. no 0x601a... I have seen both a boot sector program > and a PD 50Hz program, but I can not find them now that > I need to disassemble them. I looked at that file too, and also could not get it to work. I wrote up a small program to do it for me instead: ; program to set 50 Hertz color video mode syncmode equ $ff820a palmode equ $000448 sshiftmd equ $00044c .text clr.l -(a7) move.w #$20,-(a7) ;Super trap #$1 addq #6,a7 btst #1,sshiftmd ;Are we in color? bne.s quit ;nope, go quit bset.b #$1,syncmode st palmode+1 quit: move.l d0,-(a7) move.w #$20,-(a7) trap #$1 addq #6,a7 clr.w -(a7) trap #1 .end For your purposes, you can omit the call to Super, as I believe the boot sector is already in supervisor mode when it's executed. > > 2.) Starting up a disk that has an executable boot sector: > How? I've tried loading in the sector and jumping to it... > (I know, stupid idea). I disassembled it, but after going > into supervisor mode ala trap 14, it has an illegal instruct. > I've tried jumping to the vector in 0x47a but that accesses > the disk momentarily and quits. Anyone have any ideas? > > (P.S., yeah I know, shut off the hard disk and press reset!) > but I would like to do 1. and then 2. > > Any info greatly appreciated. Thanks in advance. -- Greg Well, if you're into disassembly anyway, why not diassemble your ROM, and find out where it's disk boot entry point is? Looking thru my BIOS listing from the ST Internals book, I see that all the ROM routine does is test if the sector is executable, and then JSR to it. Then it does an RTS. Seems like what you describe should have worked. Why don't you just jump thru the reset vector for a cold boot? Append the couple bytes worth of code I listed above to the relevant boot sector, and go. -- -- Howard Chu @ University of Michigan