[Coco] Mass flasher user input pls

Barry Nelson barry.nelson at amobiledevice.com
Fri Nov 3 18:59:20 EDT 2017


Reposting to correct small error in the previous ASM listing.
By prepending the program below in front of any bin file, including the bin headers, you can turn almost any bin into a bank switched rom that can be flashed into a CoCo Flash.

                :00001         ORG        $C000
     02DD       :00002 ADDRSS  EQU        $02DD    RAM LOCATION LOADER
C000 308C11     :00003 LOADER  LEAX       STARTLD,PCR Setup to copy to RAM
C003 108E02DD   :00004         LDY        #ADDRSS  Destination
C007 A680       :00005 RAMCPY  LDA        ,X+
C009 A7A0       :00006         STA        ,Y+
C00B 108C0342   :00007         CMPY       #ADDRSS+LDEND-STARTLD
C00F 2FF6       :00008         BLE        RAMCPY
C011 7E02DD     :00009         JMP        ADDRSS
C014 4F         :00010 STARTLD CLRA
C015 B7FF40     :00011         STA        $FF40   SET ROM BANK TO 0
C018 A78C5D     :00012         STA        BANKN,PCR
                :00013 * THIS SUBROUTINE STORES A ZEROS AT $C000 IN RAM
                :00014 * THIS IS NEEDED FOR A COCO 3
C01B B7FFDF     :00015         STA        $FFDF
C01E 8EC000     :00016         LDX        #$C000
C021 A780       :00017 CLRLOOP STA        ,X+
C023 8CC0FF     :00018         CMPX       #$C0FF
C026 2FF9       :00019         BLE        CLRLOOP
C028 B7FFDE     :00020         STA        $FFDE
                :00021 * Now setup basic
C02B 8655       :00022         LDA        #85      SET WARM RESET 
C02D 9771       :00023         STA        113 
C02F CC80C0     :00024         LDD        #32960   SET EXTENDED BASIC RESET VECTOR 
C032 DD72       :00025         STD        114 
C034 BDB95C     :00026         JSR        47452    SET UP PARAMETERS FOR BASIC 
C037 8635       :00027         LDA        #53      RESTORE INTERRUPTS 
C039 B7FF03     :00028         STA        65283    THAT ARE 
C03C 8634       :00029         LDA        #52      DISABLED ON 
C03E B7FF23     :00030         STA        65315    CARTRIDGE AUTO START 
C041 3440       :00031         PSHS       U
C043 CEC079     :00032 BASIN   LDU        #$C000+BINLOD-LOADER
C046 10AE43     :00033         LDY        3,U      TARGET ADDRESS
C049 3045       :00034         LEAX       5,U      START OF ML
C04B EC41       :00035         LDD        1,U      LENGTH
C04D E343       :00036         ADDD       3,U      CALCULATE END ADDRESS
C04F 3540       :00037         PULS       U
C051 FD02DD     :00038         STD        733      STORE END ADDRESS
C054 A680       :00039 MLCOPY  LDA        ,X+      COPY ML PROGRAM TO RAM
C056 A7A0       :00040         STA        ,Y+
C058 8CFE00     :00041         CMPX       #$FE00
C05B 2D0D       :00042         BLT        NOTNXT
C05D A68C18     :00043         LDA        BANKN,PCR
C060 4C         :00044         INCA
C061 A78C14     :00045         STA        BANKN,PCR CHANGE TO NEXT ROM BANK
C064 B7FF40     :00046         STA        $FF40    SET ROM BANK NUMBER
C067 8EC000     :00047         LDX        #$C000   START AGAIN AT BEGINING OF ROM
C06A 10BC02DD   :00048 NOTNXT  CMPY       733
C06E 2DE4       :00049         BLT        MLCOPY
C070 10AE03     :00050         LDY        3,X      GET EXEC ADDRESS
C073 4F         :00051         CLRA
C074 9770       :00052         STA        112      SET CONSOLE IN BUFFER FLAG 
C076 6EA4       :00053         JMP        ,Y
C078 00         :00054 BANKN   FCB        0
     C079       :00055 LDEND   EQU        *
     C079       :00056 BINLOD  EQU        *
                :00057         END        LOADER



More information about the Coco mailing list