MAME: Soak Test

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

MAME: Soak Test

Post by Pernod70 »

Have any of you expert circuit tracers determined how the soak test cartridge works?

There's not much on there, NAND gate, HEX inverter, and a 555 timer. I'd guess the timer delays it's output until the Dragon has booted, for how long?

It also looks like the LED output is controlled by writing to $FF40, but which bits control each LED?
User avatar
robcfg
Posts: 1529
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: MAME: Soak Test

Post by robcfg »

Hi,

Regarding the LEDs, would poking &HFF40 with values 1,2,4,8,16,32,64,128 and 0 be an adequate test? I'll be asking the owner of the cartridge to test that if it's valid.

I disassembled the rom, and the useful part of it is quite small:

Code: Select all

0000: 8E C0 DB       ldx      #0xC0DB
0003: 86 7E          lda      #7E
0005: B7 01 09       sta      0x0109
0008: BF 01 0A       stx      0x010A
000B: 0F 01          clr      0x01
000D: B7 FF 40       sta      0xFF40
0010: 96 02          lda      0x02
0012: 8E 01 10       ldx      #0x0110
0015: 8C 7F FF       cmpx     #0x7FFF
0018: 27 14          beq      0x2E
001A: A7 84          sta      ,x
001C: E6 80          ldb      ,x+
001E: D1 02          cmpb     0x02
0020: 26 05          bne      0x27
0022: B7 FF 40       sta      0xFF40
0025: 20 EE          bra      0x15

0027: C6 01          ldb      #01
0029: D7 01          stb      0x01
002B: 7E C0 D8       jmp      0xC0D8

002E: 4F             clra     
002F: 8E 80 00       ldx      #0x8000
0032: A6 80          lda      ,x+
0034: AB 80          adda     ,x+
0036: B7 FF 40       sta      0xFF40
0039: 8C 8F FF       cmpx     #0x8FFF
003C: 26 F6          bne      0x34
003E: 81 99          cmpa     #99
0040: 26 2D          bne      0x6F
0042: 4F             clra     
0043: AB 80          adda     ,x+
0045: B7 FF 40       sta      0xFF40
0048: 8C 9F FF       cmpx     #0x9FFF
004B: 26 F6          bne      0x43
004D: 81 AC          cmpa     #AC
004F: 26 1E          bne      0x6F
0051: 4F             clra     
0052: AB 80          adda     ,x+
0054: B7 FF 40       sta      0xFF40
0057: 8C AF FF       cmpx     #0xAFFF
005A: 26 F6          bne      0x52
005C: 81 02          cmpa     #02
005E: 26 0F          bne      0x6F
0060: 4F             clra     
0061: AB 80          adda     ,x+
0063: B7 FF 40       sta      0xFF40
0066: 8C BF FF       cmpx     #0xBFFF
0069: 26 F6          bne      0x61
006B: 81 6D          cmpa     #6D
006D: 27 07          beq      0x76
006F: C6 01          ldb      #01
0071: D7 01          stb      0x01
0073: 7E C0 D8       jmp      0xC0D8

0076: 4F             clra     
0077: B7 FF 02       sta      0xFF02
007A: B6 FF 00       lda      0xFF00
007D: 84 7F          anda     #7F
007F: 81 7F          cmpa     #7F
0081: 27 07          beq      0x008A
0083: C6 01          ldb      #01
0085: D7 01          stb      0x01
0087: 7E C0 D8       jmp      0xC0D8

008A: CE FF 02       ldu      #0xFF02
008D: B7 FF 40       sta      0xFF40
0090: 0F 03          clr      0x03
0092: 96 03          lda      0x03
0094: A7 C4          sta      ,u
0096: E6 C4          ldb      ,u
0098: D1 03          cmpb     0x03
009A: 26 38          bne      0x00D4
009C: B7 FF 40       sta      0xFF40
009F: 0C 03          inc      0x03
00A1: 26 EF          bne      0x0092
00A3: 8E FF 20       ldx      #0xFF20
00A6: 1C FE          andcc    #FE
00A8: 0F 04          clr      0x04
00AA: 86 08          lda      #08
00AC: 97 03          sta      0x03
00AE: B7 FF 40       sta      0xFF40
00B1: A7 84          sta      ,x
00B3: E6 84          ldb      ,x
00B5: C4 F8          andb     #F8
00B7: D1 03          cmpb     0x03
00B9: 26 19          bne      0x00D4
00BB: 48             asla     
00BC: 25 02          bcs      0x00C0
00BE: 20 EC          bra      0x00AC

00C0: 0D 04          tst      0x04
00C2: 2B 0B          bmi      0x00CF
00C4: 8E FF 22       ldx      #0xFF22
00C7: 86 80          lda      #80
00C9: 97 04          sta      0x04
00CB: 86 08          lda      #08
00CD: 20 DD          bra      0x00AC

00CF: 0C 02          inc      0x02
00D1: 7E C0 10       jmp      0xC010

00D4: C6 01          ldb      #01
00D6: D7 01          stb      0x01
00D8: 12             nop      
00D9: 20 FD          bra      0x00D8

00DB: 96 01          lda      0x01
00DD: 26 03          bne      0x00E2
00DF: B7 FF 40       sta      0xFF40
00E2: 3B             rti      
The rest seems to be extra data from the assembler, "M6809 MACROASSEMBLER 3.04 COPYRIGHT BY MOTOROLA 1978".
Pernod70
Posts: 122
Joined: Sat Apr 22, 2017 10:06 pm
Location: Croydon, UK

Re: MAME: Soak Test

Post by Pernod70 »

robcfg wrote:Regarding the LEDs, would poking &HFF40 with values 1,2,4,8,16,32,64,128 and 0 be an adequate test? I'll be asking the owner of the cartridge to test that if it's valid.
That would definitely be a good start, thanks.

In my logging I'm seeing lots of different values being written to &HFF40, so it may not be a simple single bit per LED. Let's see what the test tells us.

A video of the cart may be useful too, to show when it starts lighting the LEDs and whether they're stable or flashing per test, etc.

Apart from the checksum test, any idea what else it tests?
Post Reply