root@pipsqueak:/home/rat/lcd/st2205tool# ./generate-hack.pl /dev/sdb hack/m_shift003 Creating hack/m_shift003... using DA65=/home/rat/lcd/cc65/src/da65/da65 using PHACK=/home/rat/lcd/st2205tool/phack Dumping firmware: /home/rat/lcd/st2205tool/phack -df fwimage.bin /dev/sdb .. Firmware dumped. Splitting firmware into 16k segments... 1+0 records in 1+0 records out 16384 bytes (16 kB) copied, 0.000125267 s, 131 MB/s 1+0 records in 1+0 records out 16384 bytes (16 kB) copied, 0.000141819 s, 116 MB/s 1+0 records in 1+0 records out 16384 bytes (16 kB) copied, 0.000142774 s, 115 MB/s 1+0 records in 1+0 records out 16384 bytes (16 kB) copied, 0.00013387 s, 122 MB/s Locating CMP_VAR1 & CMP_VAR2... 038D->038E L6AC7: lda $038D cmp #$31 bne L6AD7 lda $038E cmp #$00 bne L6AD7 Locating PATCH_AT... L6B05: lda #$FF ldx #$FF L6B09: sta $038D stx $038E rts Creating lookforme.bin... 12+0 records in 12+0 records out 12 bytes (12 B) copied, 0.000142368 s, 84.3 kB/s Locating free space .. Empty space: found 2245 0xff bytes starting at 0x3715 FYI - you can verify with: hexdump -s 0x3715 -n 2245 -v fwimage-seg0.bin | less Locating SEND_CSW... L69CD: pha lda #$55 sta $0240 lda #$53 sta $0241 lda #$42 sta $0242 lda #$53 Locating LEN0 LEN1 LEN2 LEN3... stz $0381 stz $0382 lda $0216 stz $0381 lda $0217 sta $0380 asl $0380 rol $0381 rol $0382 stz $0385 stz $0386 lda $0216 stz $0385 lda $0217 sta $0384 asl $0384 rol $0385 rol $0386 Warning! multiple matches (2) - will use the first one after SEND_CSW location Guessing CTRTYPE... ---- lda #$2A sta $8000 lda #$02 sta $C000 lda #$81 sta $C000 lda #$2B sta $8000 lda #$00 sta $C000 lda #$7F sta $C000 CTRTYPE is probably 0 (PCF8833) Writing spec file... Compiling hacks...Assembling m_coby_dp151... Assembling hack.asm into m_coby_dp151/hack.bin... Pass #1 Pass #2 Assembling hack_jmp.asm into m_coby_dp151/hack_jmp.bin... Pass #1 Pass #2 Assembling lookforme.asm into m_coby_dp151/lookforme.bin... Pass #1 Pass #2 m_coby_dp151 assembled. Assembling m_coby_dp151_v8... Assembling hack.asm into m_coby_dp151_v8/hack.bin... Pass #1 Pass #2 Assembling hack_jmp.asm into m_coby_dp151_v8/hack_jmp.bin... Pass #1 Pass #2 Assembling lookforme.asm into m_coby_dp151_v8/lookforme.bin... Pass #1 Pass #2 m_coby_dp151_v8 assembled. Assembling m_coby_dp152... Assembling hack.asm into m_coby_dp152/hack.bin... Pass #1 Pass #2 Assembling hack_jmp.asm into m_coby_dp152/hack_jmp.bin... Pass #1 Pass #2 Assembling lookforme.asm into m_coby_dp152/lookforme.bin... Pass #1 Pass #2 m_coby_dp152 assembled. Assembling m_coby_dp152.lst... cp: cannot stat `m_coby_dp152.lst/spec': Not a directory Assembling hack.asm into m_coby_dp152.lst/hack.bin... Pass #1 Pass #2 >>>> 20 ERROR: Can't open include file 20 INCLUDE spec >>>> 21 ERROR: Undefined label 21 * = EMPTY_AT+$4000 -- >>>> 31 ERROR: Undefinable label: no org given 31 start lda CMP_VAR1 >>>> 32 ERROR: No org given 32 cmp #$22 >>>> 33 ERROR: No org given 33 bne nomagic >>>> 34 ERROR: Undefined label 34 lda CMP_VAR2 >>>> 35 ERROR: No org given 35 cmp #$00 >>>> 36 ERROR: No org given 36 bne nomagic >>>> 37 ERROR: No org given 37 bra gotcha -- >>>> 39 ERROR: Undefinable label: no org given 39 nomagic lda #$ff >>>> 40 ERROR: No org given 40 ldx #$ff >>>> 41 ERROR: Undefined label 41 jmp PATCH_AT+$4004 -- >>>> 44 ERROR: Undefinable label: no org given 44 gotcha lda #$04 >>>> 45 ERROR: No org given 45 sta $73 -- >>>> 48 ERROR: No org given 48 lda $35 >>>> 49 ERROR: No org given 49 pha -- >>>> 52 ERROR: No org given 52 lda #$3 >>>> 53 ERROR: No org given 53 sta $35 -- >>>> 55 ERROR: Undefined label 55 stz LEN0 -- >>>> 57 ERROR: Undefinable label: no org given 57 waitpacket lda $73 >>>> 58 ERROR: No org given 58 and #$4 >>>> 59 ERROR: Undefined label 59 beq waitpacket -- >>>> 62 ERROR: No org given 62 lda $200 >>>> 63 ERROR: No org given 63 cmp #$0 >>>> 64 ERROR: No org given 64 beq copy2fb >>>> 65 ERROR: No org given 65 cmp #$1 >>>> 66 ERROR: No org given 66 beq setaddr >>>> 67 ERROR: No org given 67 cmp #$2 >>>> 68 ERROR: No org given 68 beq blon >>>> 69 ERROR: No org given 69 cmp #$3 >>>> 70 ERROR: No org given 70 beq bloff >>>> 71 ERROR: No org given 71 bra packetend -- >>>> 74 ERROR: Undefinable label: no org given 74 blon lda $03 -- >>>> 75 ERROR: No org given 75 and #($ff-$04) >>>> 76 ERROR: No org given 76 sta $03 >>>> 77 ERROR: No org given 77 bra packetend -- >>>> 80 ERROR: Undefinable label: no org given 80 bloff lda $03 >>>> 81 ERROR: No org given 81 ora #$04 >>>> 82 ERROR: No org given 82 sta $03 >>>> 83 ERROR: No org given 83 bra packetend -- >>>> 87 ERROR: Undefined label 87 IF CTRTYPE=1 ;UC1697V -- >>>> 90 ERROR: Undefinable label: no org given 90 setaddr lda #$F6 ;endx >>>> 91 ERROR: No org given 91 sta $8000 >>>> 92 ERROR: No org given 92 lda $202 >>>> 93 ERROR: No org given 93 sta $8000 -- >>>> 95 ERROR: No org given 95 lda #$F7 ;endy >>>> 96 ERROR: No org given 96 sta $8000 >>>> 97 ERROR: No org given 97 lda $204 >>>> 98 ERROR: No org given 98 sta $8000 -- >>> 100 ERROR: No org given 100 lda #$F4 ;startx >>> 101 ERROR: No org given 101 sta $8000 >>> 102 ERROR: No org given 102 lda $201 >>> 103 ERROR: No org given 103 sta $8000 -- >>> 105 ERROR: No org given 105 lda #$F5 ;starty >>> 106 ERROR: No org given 106 sta $8000 >>> 107 ERROR: No org given 107 lda $203 >>> 108 ERROR: No org given 108 sta $8000 -- >>> 120 ERROR: No org given 120 bra packetend >>> 121 ERROR: ELSE, ENDC, ENDM, EXITM illegal here 121 ENDC >>> 122 ERROR: Undefined label 122 IF CTRTYPE==0 ;PCF8833 -- >>> 124 ERROR: Undefinable label: no org given 124 setaddr lda #$2A >>> 125 ERROR: No org given 125 sta $8000 >>> 126 ERROR: No org given 126 lda $201 >>> 127 ERROR: No org given 127 sta $c000 >>> 128 ERROR: No org given 128 lda $202 >>> 129 ERROR: No org given 129 sta $c000 -- >>> 131 ERROR: No org given 131 lda #$2B >>> 132 ERROR: No org given 132 sta $8000 >>> 133 ERROR: No org given 133 lda $203 >>> 134 ERROR: No org given 134 sta $c000 >>> 135 ERROR: No org given 135 lda $204 >>> 136 ERROR: No org given 136 sta $c000 -- >>> 138 ERROR: No org given 138 lda #$2c >>> 139 ERROR: No org given 139 sta $8000 -- >>> 141 ERROR: No org given 141 bra packetend >>> 142 ERROR: ELSE, ENDC, ENDM, EXITM illegal here 142 ENDC -- >>> 148 ERROR: Undefinable label: no org given 148 copy2fb lda #$2 >>> 149 ERROR: No org given 149 sta $58 >>> 150 ERROR: No org given 150 sta $59 -- >>> 152 ERROR: No org given -- >>> 153 ERROR: No org given 153 stz $5f -- >>> 155 ERROR: No org given 155 lda #$C0 >>> 156 ERROR: No org given 156 sta $5b -- >>> 159 ERROR: No org given 159 stz $5D >>> 160 ERROR: No org given 160 lda $201 -- >>> 163 ERROR: No org given 163 db $3a ;=hardcoded 'dea' >>> 164 ERROR: No org given 164 sta $5C -- >>> 169 ERROR: Undefinable label: no org given 169 packetend sec >>> 170 ERROR: Undefined label 170 lda LEN0 >>> 171 ERROR: No org given 171 sbc #$40 >>> 172 ERROR: Undefined label 172 sta LEN0 >>> 173 ERROR: Undefined label 173 lda LEN1 >>> 174 ERROR: No org given 174 sbc #$0 >>> 175 ERROR: Undefined label 175 sta LEN1 >>> 176 ERROR: Undefined label 176 lda LEN2 >>> 177 ERROR: No org given 177 sbc #$0 >>> 178 ERROR: Undefined label 178 sta LEN2 -- >>> 185 ERROR: No org given 185 lda #$04 >>> 186 ERROR: No org given 186 sta $73 -- >>> 190 ERROR: Undefined label 190 lda LEN2 >>> 191 ERROR: Undefined label 191 ora LEN1 -- >>> 192 ERROR: Undefined label 192 ora LEN0 >>> 193 ERROR: No org given 193 beq nowaitpacket >>> 194 ERROR: Undefined label 194 jmp waitpacket -- >>> 197 ERROR: Undefinable label: no org given 197 nowaitpacket pla >>> 198 ERROR: No org given 198 sta $35 -- >>> 202 ERROR: No org given 202 lda #$00 >>> 203 ERROR: Undefined label 203 jsr SEND_CSW+0x4000 -- >>> 206 ERROR: No org given 206 lda #$ff >>> 207 ERROR: No org given 207 ldx #$ff >>> 208 ERROR: Undefined label 208 jmp PATCH_AT+$4004 -- >>> 211 ERROR: No org given 211 db "H","4","C","K" >>> 212 ERROR: No org given 212 db 1 ;version of info block >>> 213 ERROR: Undefined label 213 db CONF_XRES >>> 214 ERROR: Undefined label 214 db CONF_YRES >>> 215 ERROR: Undefined label 215 db CONF_BPP >>> 216 ERROR: Undefined label 216 db CONF_PROTO >>> 217 ERROR: Undefined label 217 db OFFX >>> 218 ERROR: Undefined label 218 db OFFY Error assembling m_coby_dp152.lst/hack.bin. Please check m_coby_dp152.lst for more info. Done. If you are brave you can now attempt to flash using: hackfw.sh /dev/sdb