Skip to main content
Home Forums 68kMLA Removing startup artifacts of "improved" ROM SE/30!!! — #14
Post #14 by zuiko21
Source Forum68kMLA
CategoryTroubleshooting
Post DateSun, 1 Jul 2012 - 10:42
Original URLhttps://68kmla.org/bb/threads/removing-startup-artifacts-of-quot-improved-quot-rom-se-30.25600/
Post
Back again...

Assembler? :lol: So far I've been assembling by hand...

Anyway, while I get a reasonable tool somewhere, I experimented with the register at $0802 -- just putting your code inside a loop that will try every single value for that register, stored in otherwise unused D3. For debugging purposes, I "placed" that byte on the screen so I can see what's going on. Here's what I flashed lastly on the Jolly Roger SIMM:

Code:
40000000    0000000040800008  ;SP-PC Reset

;disable interrupts... just in case

40000008    007C0700          ;MOVE #0x0700, SR

;put image at 0x40001000 on screen

4000000C    41F940001000      ;LEA Picture, A0
40000012    43F9FE008000      ;LEA VideoBuffer, A1
40000018    303C1560          ;MOVE.W #0x1560, D0
4000001C*1  2218              ;MOVE.L (A0)+, D1
4000001E    23418000          ;MOVE.L D1, (0x8000, A1)
40000022    22C1              ;MOVE.L D1, (A1)+
40000024    5340              ;SUBQ.W #1, D0
40000026    66F4              ;BNE.S *1

;loop for trying every 0x802 value!

           7600              ;MOVEQ #0, D3  ;init value
*8          13C3FE001877      ;MOVE.B D3, BYTE  ;show on screen
           13C3FE009877      ;MOVE.B D3, BYTE2
           17430802          ;MOVE.B D3, (0x802, A3)  ;set reg

;dougg3's sampled sound code (at absolute address 0x40007000)

           47F950F14000      ;LEA 0x50F14000, A3
           41F940007000      ;LEA Sample, A0  [41FA-"rel16"]
           177C00010801      ;MOVE.B #0x01, (0x801, A3)
           422B0807          ;CLR.B (0x807, A3)
           177C00400806      ;MOVE.B #0x40, (0x806, A3)
           277CFE00FE000830  ;MOVE.L #0xFE00FE00, (0x830, A3)
           277CFE00FE000834  ;MOVE.L #0xFE00FE00, (0x834, A3)
           177C00800803      ;MOVE.B #0x80, (0x803, A3)
           422B0803          ;CLR.B (0x803, A3)
           4A2B0804          ;TST.B (0x804, A3)
           2018              ;MOVE.L (A0)+, D0
           2200              ;MOVE.L D0, D1
           4841              ;SWAP D1
           6014              ;BRA.S *5
*2          082B00010804		;BTST #1, (0x804, A3)  ;PSIC
           6708              ;BEQ.S *4
*3          082B00000804		;BTST #0, (0x804, A3) ;WHE
           67F8              ;BEQ.S *3
*4          1418              ;MOVE.B (A0)+, D2  ;DS
           1682              ;MOVE.B D2, (A3)
*5          51C8FFEA          ;DBF D0, *2  ;NS
           51C9FFE6          ;DBF D1, *2
*6          177C00010801      ;MOVE.B #0x01, (0x801, A3)
           422B0807          ;CLR.B (0x807, A3)
           177C00400806      ;MOVE.B #0x40, (0x806, A3)
           277CFE00FE000830  ;MOVE.L #0xFE00FE00, (0x830, A3)
           277CFE00FE000834  ;MOVE.L #0xFE00FE00, (0x834, A3)
           177C00800803      ;MOVE.B #0x80, (0x803, A3)
           422B0803          ;CLR.B (0x803, A3)
           4A2B0804          ;TST.B (0x804, A3)

;loop's end

           5203              ;ADDQ.B #1, D3  ;next value
           6600FF60          ;BNE *8

;put a counter on the screen saying we're finished

*7          53B9FE001844      ;SUBQ.L #1, SITIO
           53B9FE009844      ;SUBQ.L #1, SITIO2
           60F2              ;BRA.S *7
Now, the bad news :( None of the values played the sample cleanly, although the effect of some bits of this register became evident:

D0: disables sound (if set to "1")

D1: makes sound weaker (volume control?)

D3: makes sound even weaker (can be combined with D1 for further attenuation)

Not sure if any other bits had effect on the sound, but at least we know something more about the ASC :b&w:

There has to be some other obscure initialization pending...

mp.ls