Listing of Golden 2 load program
Previus Credits Index Next

Now there's a listing of the program that contain the instruction to read this format. The fields that depends by the particular game that are loading are removed.
The load routine uses screen loading border effect.
This program is also autostarting (see location 0302h) and the loaded program is automatically execute (location 03F5 RTI), becouse it pass the cpu control to a loaded address.

Program block loaded

0302  B6 03      dw 03B6          Routine: Read the program
0304  B5
Header of loaded program

033C  03         db 03            Type
033D  02 03      dw 0302          StartAddress
033F  05 03      dw 0305          EndAddress
0341  20 20 20 20 20 20 20 20     Nome
0349  20 20 20 20 20 20 20 20
0351  20
0352  03 4C      SLO  ($4C,X)     Scratch area BASIC pointer
                                  Routine: Read a bit
0354  A9 10      LDA  #$10
0356  2C 0D DC   BIT  $DC0D       Interrupt control register CIA #1
0359  F0 FB      BEQ  $0356       Tape I/O buffer
035B  8E 07 DD   STX  $DD07       Timer B #2: HI Byte
035E  A9 19      LDA  #$19
0360  8D 0F DD   STA  $DD0F       Control register B of CIA #2
0363  AD 0D DD   LDA  $DD0D       Interrupt control register CIA #2
0366  4A         LSR  A           Count 107h=263 cycle of ~1Mhz
0367  4A         LSR  A
0368  60         RTS
                                  Routine: Delay cycle
0369  A0 00      LDY  #$00        
036B  84 C0      STY  $C0         Stop motor of tape
036D  A9 0B      LDA  #$0B        
036F  8D 11 D0   STA  $D011       VIC control register
0372  CA         DEX
0373  D0 FD      BNE  $0372       Tape I/O buffer
0375  88         DEY
0376  D0 FA      BNE  $0372       Tape I/O buffer
0378  78         SEI
0379  60         RTS
                                  Routine: Read a Byte (in A e $BD)
037A  A9 08      LDA  #$08
037C  85 A3      STA  $A3         Serial counter of bits: Flag EOI
037E  20 54 03   JSR  $0354       Routine: Read a bit
0381  26 BD      ROL  $BD         RS-232 output parity/Transient cassette
0383  EE 20 D0   INC  $D020       Borde color
0386  C6 A3      DEC  $A3         Serial counter of bits: Flag EOI
0388  D0 F4      BNE  $037E       Tape I/O buffer
038A  A5 BD      LDA  $BD         RS-232 output parity/Transient cassette
038C  60         RTS
                                  Routine: Found synchronization
038D  20 69 03   JSR  $0369       Routine: Delay cycle
0390  A9 07      LDA  #$07        
0392  8D 06 DD   STA  $DD06       Timer B #2: Lo Byte
0395  A2 01      LDX  #$01        Count 107h=263 cycle of ~1Mhz
0397  20 54 03   JSR  $0354       Routine: Read a bit
039A  26 BD      ROL  $BD         RS-232 output parity/Transient cassette
039C  A5 BD      LDA  $BD         RS-232 output parity/Transient cassette
039E  C9 02      CMP  #$02        Synchronization byte
03A0  D0 F5      BNE  $0397       Tape I/O buffer
03A2  A0 09      LDY  #$09        Countdown start of sequence
03A4  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD)
03A7  C9 02      CMP  #$02        Synchronization byte 
03A9  F0 F9      BEQ  $03A4       Tape I/O buffer
03AB  C4 BD      CPY  $BD         RS-232 output parity/Transient cassette
03AD  D0 E8      BNE  $0397       Tape I/O buffer
03AF  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD)
03B2  88         DEY              Execute  countdown
03B3  D0 F6      BNE  $03AB       Tape I/O buffer
03B5  60         RTS
                                  Routine: Read the program
03B6  58         CLI
03B7  20 8D 03   JSR  $038D       Routine: Found synchronization (and read starting address)
03BA  85 C1      STA  $C1         I/O starting address
03BC  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD) (starting address)
03BF  85 C2      STA  $C2         I/O starting address
03C1  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD) (ending address)
03C4  85 2D      STA  $2D         Pointer: BASIC starting variables
03C6  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD) (ending address)
03C9  85 2E      STA  $2E         Pointer: BASIC starting variables
03CB  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD) (return address)
03CE  48         PHA
03CF  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD) (return address)
03D2  48         PHA
03D3  98         TYA
03D4  48         PHA
03D5  20 7A 03   JSR  $037A       Routine: Read a Byte (in A e $BD)
03D8  91 C1      STA  ($C1),Y     I/O starting address
03DA  E6 C1      INC  $C1         I/O starting address
03DC  D0 02      BNE  $03E0       Tape I/O buffer
03DE  E6 C2      INC  $C2         I/O starting address
03E0  A5 C1      LDA  $C1         I/O starting address
03E2  C5 2D      CMP  $2D         Pointer: BASIC starting variables
03E4  A5 C2      LDA  $C2         I/O starting address
03E6  E5 2E      SBC  $2E         Pointer: BASIC starting variables
03E8  90 EB      BCC  $03D5       goto read next byte
03EA  E6 C0      INC  $C0         Stop motor of tape
03EC  8C A0 02   STY  $02A0       Contain IRQ vector during tape I/O
03EF  20 93 FC   JSR  $FC93       Routine: Stop motor, disable int. CIA #1
03F2  20 A0 E5   JSR  $E5A0       Routine: Set VIC6567 registers and devices
03F5  40         RTI
03F6  20 59 A6   JSR  $A659       BASIC ROM
03F9  4C EA A7   JMP  $A7EA       BASIC ROM
03FC  21
 
Top
C= Logo
commodore 64 c64-pc logo Tognon Stefano programs