|
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, becouse it is loaded with Shift+Run/Stop.
02A7 20 53 E4 JSR $E453 Routine: Set BASIC vectors (case 0x300..case 0x309) 02AA 20 44 E5 JSR $E544 Routine: Screen delete 02AD A0 F0 LDY #$F0 02AF 8C 21 D0 STY $D021 Background 0 color 02B2 C8 INY 02B3 8C 86 02 STY $0286 Current char color code 02B6 A2 02 LDX #$02 02B8 A0 02 LDY #$02 02BA 18 CLC 02BB 20 F0 FF JSR $FFF0 Routine: Read/Set cursor (X,Y) position 02BE A0 EF LDY #$EF Pointer to ' PROGRAM NAME:' 02C0 B9 00 02 LDA $0200,Y INPUT buffer of BASIC 02C3 20 D2 FF JSR $FFD2 Routine: Send a char in the canal 02C6 C8 INY 02C7 D0 F7 BNE $02C0 Not used 02C9 B9 41 03 LDA $0341,Y Tape I/O buffer 02CC 20 D2 FF JSR $FFD2 Routine: Send a char in the canal 02CF C8 INY Write the name of program 02D0 C0 10 CPY #$10 02D2 D0 F5 BNE $02C9 Not used 02D4 A9 0F LDA #$0F 02D6 8D 86 02 STA $0286 Current char color code 02D9 A2 6D LDX #$6D 02DB A0 03 LDY #$03 Set load routine as at $036D 02DD 8E 30 03 STX $0330 KERNAL LOAD routine vector 02E0 8C 31 03 STY $0331 KERNAL LOAD routine vector 02E3 A9 83 LDA #$83 Key: Shift+Run/Stop 02E5 8D 77 02 STA $0277 Keyboard buffer queue (FIFO) 02E8 A9 01 LDA #$01 02EA 85 C6 STA $C6 Number of char in keyboard buffer 02EC 4C 7B E3 JMP $E37B Routine (from case 0xA002): close canals, start up 02EF 20 50 52 4F 47 52 41 4D PROGRAM 02F7 20 20 4E 41 4D 45 20 3A 20 NAME : 0300 8B E3 dw E38B Routine: Write BASIC error messages 0302 A7 02 dw 02A7 Routine: BASIC start up
033C 03 db 03 Type 033D A7 02 dw 02A7 Start program 033F 04 03 dw 0304 End program 0341 20 20 20 20 20 20 20 20 Name of game 0349 20 20 20 20 20 20 20 20 Routine: Read 1 byte 0351 A0 08 LDY #$08 0353 A9 10 LDA #$10 0355 2C 0D DC BIT $DC0D Interrupt control register CIA #1 0358 F0 FB BEQ $0355 Tape I/O buffer 035A AD 0D DD LDA $DD0D Interrupt control register CIA #2 035D 8E 0F DD STX $DD0F Control register B of CIA #2 0360 4A LSR A Count 180h=384 cycle of ~1Mhz 0361 4A LSR A 0362 66 BD ROR $BD RS-232 output parity/Transient cassette 0364 EE 20 D0 INC $D020 Borde color (screen effect) 0367 88 DEY 0368 D0 E9 BNE $0353 Tape I/O buffer 036A A5 BD LDA $BD RS-232 output parity/Transient cassette 036C 60 RTS 036D 78 SEI Routine: Read the program 036E A9 07 LDA #$07 0370 85 01 STA $01 6510 I/O register 0372 A2 19 LDX #$19 0374 A9 80 LDA #$80 0376 8D 06 DD STA $DD06 Timer B #2: Lo Byte 0379 A9 01 LDA #$01 Count 180h=384 cycle of ~1Mhz 037B 8D 07 DD STA $DD07 Timer B #2: HI Byte 037E 8E 0F DD STX $DD0F Control register B of CIA #2 0381 A0 09 LDY #$09 Try to find synchronization 0383 20 53 03 JSR $0353 Routine: Read 9 bits 0386 C9 02 CMP #$02 Synchronization byte 0388 D0 F7 BNE $0381 Tape I/O buffer 038A 20 51 03 JSR $0351 Routine: Read 1 byte 038D C9 02 CMP #$02 Synchronization byte 038F F0 F9 BEQ $038A We are synchonized, 0391 C9 52 CMP #$52 attend an identifier 0393 D0 EC BNE $0381 Tape I/O buffer 0395 20 51 03 JSR $0351 Routine: Read 1 byte 0398 C9 42 CMP #$42 039A D0 E5 BNE $0381 Tape I/O buffer 039C 20 51 03 JSR $0351 Routine: Read 1 byte (starting address) 039F 85 AC STA $AC Pointer: Tape buffer/Screen scrolling 03A1 85 C1 STA $C1 I/O starting address 03A3 20 51 03 JSR $0351 Routine: Read 1 byte (starting address) 03A6 85 AD STA $AD Pointer: Tape buffer/Screen scrolling 03A8 85 C2 STA $C2 I/O starting address 03AA 20 51 03 JSR $0351 Routine: Read 1 byte (ending address) 03AD 85 AE STA $AE Addresses of Tape end/Program end 03AF 20 51 03 JSR $0351 Routine: Read 1 byte (ending address) 03B2 85 AF STA $AF Addresses of Tape end/Program end 03B4 84 90 STY $90 Statusbyte ST of I/O KERNAL 03B6 20 51 03 JSR $0351 Routine: Read 1 byte 03B9 91 AC STA ($AC),Y Pointer: Tape buffer/Screen scrolling 03BB 45 90 EOR $90 Statusbyte ST of I/O KERNAL 03BD 85 90 STA $90 Statusbyte ST of I/O KERNAL 03BF E6 AC INC $AC Pointer: Tape buffer/Screen scrolling 03C1 D0 02 BNE $03C5 Tape I/O buffer 03C3 E6 AD INC $AD Pointer: Tape buffer/Screen scrolling 03C5 A5 AC LDA $AC Pointer: Tape buffer/Screen scrolling 03C7 C5 AE CMP $AE Addresses of Tape end/Program end 03C9 D0 EB BNE $03B6 Go to read next byte 03CB A5 AD LDA $AD Pointer: Tape buffer/Screen scrolling 03CD C5 AF CMP $AF Addresses of Tape end/Program end 03CF D0 E5 BNE $03B6 Go to read next byte 03D1 20 51 03 JSR $0351 Routine: Legge 1 byte (checksum) 03D4 45 90 EOR $90 Statusbyte ST of I/O KERNAL 03D6 F0 03 BEQ $03DB Tape I/O buffer 03D8 4C E2 FC JMP $FCE2 Routine: Startup (read error: restart) 03DB 85 90 STA $90 Statusbyte ST of I/O KERNAL 03DD A9 27 LDA #$27 03DF 85 01 STA $01 6510 I/O register 03E1 C8 INY 03E2 84 C0 STY $C0 Stop motor of tape 03E4 A6 AE LDX $AE Addresses of Tape end/Program end 03E6 A4 AF LDY $AF Addresses of Tape end/Program end 03E8 58 CLI 03E9 18 CLC 03EA 60 RTS 03EB 4C 6D 03 JMP $036D Routine: Read the program 03EE 00 00 00 00 03F2 00 00 00 00 03F6 00 00 00 00 03FA 00 00
commodore 64 | Tognon Stefano programs |