Prev: 5CD0 Up: Map Next: 5D96
5CFC: Custom Load Routine
Used by the routine at BootstrapEntry.
Custom edge sampler used by the bootstrap. It still calls the ROM edge routines at 05E3 / 05E7, but with Micromega timing thresholds rather than the standard ROM pilot. On error it restores the border from BORDCR and prints "ATTEMPTED BREAK!" or "TAPE LOADING ERROR".
CustomLoad 5CFC INC D
5CFD EX AF,AF'
5CFE DEC D
5CFF DI
5D00 LD A,$0F
5D02 OUT ($FE),A
5D04 LD HL,$5DAC
5D07 PUSH HL
5D08 IN A,($FE)
5D0A RRA
5D0B AND $20
5D0D OR $02
5D0F LD C,A
5D10 CP A
CustomLoad_0 5D11 RET NZ
CustomLoad_1 5D12 CALL $05E7
5D15 JR NC,CustomLoad_0
5D17 LD HL,$0415
CustomLoad_2 5D1A DJNZ CustomLoad_2
5D1C DEC HL
5D1D LD A,H
5D1E OR L
5D1F JR NZ,CustomLoad_2
5D21 CALL $05E3
5D24 JR NC,CustomLoad_0
CustomLoad_3 5D26 LD B,$9C
5D28 CALL $05E3
5D2B JR NC,CustomLoad_0
5D2D LD A,$A6
5D2F CP B
5D30 JR NC,CustomLoad_1
5D32 INC H
5D33 JR NZ,CustomLoad_3
CustomLoad_4 5D35 LD B,$C9
5D37 CALL $05E7
5D3A JR NC,CustomLoad_0
5D3C LD A,B
5D3D CP $D4
5D3F JR NC,CustomLoad_4
5D41 CALL $05E7
5D44 RET NC
5D45 LD A,C
5D46 XOR $03
5D48 LD C,A
5D49 LD H,$00
5D4B LD B,$B0
5D4D JR CustomLoad_10
CustomLoad_5 5D4F EX AF,AF'
5D50 JR NZ,CustomLoad_6
5D52 JR NC,CustomLoad_7
5D54 LD (IX+$00),L
5D57 JR CustomLoad_8
CustomLoad_6 5D59 RL C
5D5B XOR L
5D5C RET NZ
5D5D LD A,C
5D5E RRA
5D5F LD C,A
5D60 INC DE
5D61 JR CustomLoad_9
CustomLoad_7 5D63 LD A,(IX+$00)
5D66 XOR L
5D67 RET NZ
CustomLoad_8 5D68 INC IX
CustomLoad_9 5D6A DEC DE
5D6B EX AF,AF'
5D6C LD B,$B2
CustomLoad_10 5D6E LD L,$01
CustomLoad_11 5D70 CALL $05E3
5D73 RET NC
5D74 LD A,$CB
5D76 CP B
5D77 RL L
5D79 LD B,$B0
5D7B JP NC,CustomLoad_11
5D7E LD A,H
5D7F XOR L
5D80 LD H,A
5D81 LD A,D
5D82 OR E
5D83 JR NZ,CustomLoad_5
5D85 LD A,H
5D86 CP $01
5D88 RET
This entry point is used by the routine at BootstrapEntry.
CustomLoad_12 5D89 LD A,$01
5D8B CALL $1601
5D8E LD B,$19
5D90 LD DE,$5DEA
5D93 JP $5DC9
Prev: 5CD0 Up: Map Next: 5D96