23 March 2010, 09:55 | #81 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 830
|
|
23 March 2010, 10:00 | #82 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Asman - Correct but if I remember my own source correctly (bad memory - need to check! ) there are no free regs for the MFM decode mask...
|
23 March 2010, 10:02 | #83 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Asman, I bow - looks like d7 would be OK.
|
23 March 2010, 10:06 | #84 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Sting & Asman - legendary work guys.
I already implemented Asman's d7 save, I'll implement Sting's pea save too. 416 byte version of the trackloader to come! \o/ EDIT: Where'd Sting's pea save post just go...? Maybe only a 418 byte version to come... |
23 March 2010, 10:06 | #85 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
|
23 March 2010, 10:08 | #86 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Sorry, I was wrong (and deleted my post). (Didn't have enough coffee yet it seems). But see if you can find a free address register so you can do lea $8000,a0 ... jmp (a0) f.e. |
|
23 March 2010, 10:08 | #87 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 830
|
@StingRay
Awesome @pmc Agree, you should put move.l #$5555555,d7 before first bsr.s .mfm_decode. And please post newest version of source. |
23 March 2010, 10:09 | #88 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Sting - after yesterday's shrinking there's two free address regs - a0 and a1 if I remember correctly.
Maybe we might get below 418 yet! |
23 March 2010, 10:13 | #89 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Use the pea optimization, easier. ;D Turns out I wasn't wrong and it is indeed 2 bytes smaller. ;D (too stressful to do "fun code" when boss is around ;D) And since I deleted my original post, I'll post the pea optimization again. pea $8000 move.l (a7),a4 ... rts instead of lea $8000,a4 .... jmp $8000 Last edited by StingRay; 23 March 2010 at 10:23. Reason: added "lost" pea version again :D |
|
23 March 2010, 11:08 | #90 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
OK boys, after implementing Sting's and Asman's additional size optimisations here's the 416 byte version!
Anyone who's helped in this is now credited in the source as having done so - thanks guys - much appreciated! 416 byte version removed. Last edited by pmc; 23 March 2010 at 12:40. |
23 March 2010, 11:28 | #91 |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 830
|
So we have one free register a1. Right after comment ; Setup disk controls you should put $4489 into a1 and change a bit source, mean replace all $4489 into a1.
I need some extra coffee. We have also a0 free. Last edited by Asman; 23 March 2010 at 11:49. Reason: added forget register a0 |
23 March 2010, 11:31 | #92 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Not tested but:
andi.l #$0000ff00,d1 ;isolate sector number add.l d1,d1 ;*2 to get byte offset to place this sector in the decode buffer adda.w d1,a4 ;add the offset to the decode data buffer address could be done like this: sf d1 add.w d1,d1 add.w d1,a4 |
23 March 2010, 11:54 | #93 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Next one (maybe 400 bytes version is possible )
moveq.l #71,d7 ;head settle time bra.s .wait_timer .upper_head: bclr.b #2,(a6) ;select upper disk head moveq.l #71,d7 ;head sett can be replaced with: bra.b .w_timer71 .upper_head: bclr.b #2,(a6) ;select upper disk head .w_timer71 moveq.l #71,d7 ;head sett |
23 March 2010, 12:02 | #94 | |
68k
Join Date: Sep 2005
Location: Somewhere
Posts: 830
|
Quote:
|
|
23 March 2010, 12:03 | #95 | ||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Wait 71 timer branch optimisation implemented - trackloader now 414 bytes. Quote:
|
||
23 March 2010, 12:04 | #96 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
|
|
23 March 2010, 12:04 | #97 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
|
23 March 2010, 12:06 | #98 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
Quote:
|
||
23 March 2010, 12:10 | #99 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
|
|
23 March 2010, 12:13 | #100 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
|
Quote:
and.l #$0000ff00,d1 ; d1 = $00001200 ;d1: $ABCD1234 sf.b d1 ; d1: $ABCD1200 since we only do .w operations, it doesn't matter what's in the high word of d1 thus: and.l #$0000ff00,d1 = sf.b d1 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HD loader example | st! | Coders. General | 4 | 16 October 2012 21:56 |
Game loader stuck on certain track after save state restore | andreas | support.WinUAE | 2 | 26 March 2011 19:59 |
Can't transfer Supaplex cause of CSL track loader ! | Vollldo | support.Games | 4 | 12 March 2011 21:51 |
Hardware File Loader | h0ffman | Coders. General | 9 | 02 December 2010 16:40 |
mfm/custom regs/track loader | snyp | Coders. General | 9 | 06 June 2006 19:42 |
|
|