[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Many questions about cassette tapes



On Fri, 12 Aug 2011, Egan Ford wrote:

On Aug 11, 10:00 pm, Steve Nickolas
<lyricalnan...@usotsuki.hoshinet.org> wrote:
Replying to myself:

On Thu, 11 Aug 2011, Steve Nickolas wrote:
On Thu, 11 Aug 2011, Egan Ford wrote:

2.  If I can do #1, how would I tape load INT BASIC?  Can I make a
tape of INT BASIC?  I want to see how far I can take this tape thing.
E.g. Boot, reset, LOAD INT BASIC, INT, kill FP, LOAD INT game,
play, ...

If you got 64K, it should be possible.  A stub program that does the same job
as HELLO on the 1980 system master and relocates BASIC to the language card,
then does the equivalent of an INT ... I don't see why it shouldn't be.

(I could prolly make one, actually...)

http://xtra.usotsuki.info/intlodr.zip

It's a FLAC inside a ZIP.  Try typing LOAD and then piping it out the tape
port.  It *should* put you into INTBASIC.  Very crude.

-uso.

Brilliant!  Thanks!  Now, how did you do that?

I started with this block of assembler (the "monrom.bin" is actually an 8K Apple ][ monitor ROM). Then I used some tools I have that wrap the compression tool "Exomizer" so that it can be used for Apple ][ instead of C64 (they both have 6502-derived CPUs, they use similar BASICs, they both start code at $0801 - so it's fairly trivial), and to convert the output into a LOADable WAV file. (There's a lot of voodoo involved. I can prolly dig up my tools.)

The "haslc" code is disassembled from the 1980 DOS 3.3 system master. Most of the remainder is translated from the HELLO program on the same disk.

The header is set up with "autorun" - so all you need to do is LOAD it.

-uso.

          .org      $E80
entry:    jsr       test
          lda       haslc
          cmp       #$01
          bne       @1
          jsr       movbas
          lda       $C083
          lda       $C083
          jmp       $E000
@1:       lda       haslc
          tay
          beq       @2
          ldy       #mnorel
@2:       lda       messages, y
          beq       @3
          ora       #$80
          jsr       $FDED
          iny
          bne       @2
@3:       jmp       $FF69

messages:
mnolc      =        *-messages ; 0 - assumed above
          .byte     13, 7, "64K RAM REQUIRED", 13, 0
mnorel     =        *-messages
          .byte     13, 7, "LC LOCKED UNTIL REBOOT", 13, 0

haslc:    .byte     0
test:     lda       $E000
          pha
          lda       $C081
          pla
          pha
          cmp       $E000
          bne       @1
          lda       $C083
          lda       $C083
          lda       #$A5
          sta       $D000
          cmp       $D000
          bne       @1
          lsr
          sta       $D000
          cmp       $D000
          bne       @1
          lda       $C081
          lda       $C081
          lda       #$01
          bne       @2
@1:       lda       #$00
@2:       sta       haslc
          pla
          cmp       $E000
          beq       @3
          lda       $C080
@3:       rts

movbas:   ldy       #$00
@1:       lda       $1000, y
          sta       $E000, y
          lda       $1100, y
          sta       $E100, y
          lda       $1200, y
          sta       $E200, y
          lda       $1300, y
          sta       $E300, y
          lda       $1400, y
          sta       $E400, y
          lda       $1500, y
          sta       $E500, y
          lda       $1600, y
          sta       $E600, y
          lda       $1700, y
          sta       $E700, y
          lda       $1800, y
          sta       $E800, y
          lda       $1900, y
          sta       $E900, y
          lda       $1A00, y
          sta       $EA00, y
          lda       $1B00, y
          sta       $EB00, y
          lda       $1C00, y
          sta       $EC00, y
          lda       $1D00, y
          sta       $ED00, y
          lda       $1E00, y
          sta       $EE00, y
          lda       $1F00, y
          sta       $EF00, y
          lda       $2000, y
          sta       $F000, y
          lda       $2100, y
          sta       $F100, y
          lda       $2200, y
          sta       $F200, y
          lda       $2300, y
          sta       $F300, y
          lda       $2400, y
          sta       $F400, y
          lda       $2500, y
          sta       $F500, y
          lda       $2600, y
          sta       $F600, y
          lda       $2700, y
          sta       $F700, y
          lda       $2800, y
          sta       $F800, y
          lda       $2900, y
          sta       $F900, y
          lda       $2A00, y
          sta       $FA00, y
          lda       $2B00, y
          sta       $FB00, y
          lda       $2C00, y
          sta       $FC00, y
          lda       $2D00, y
          sta       $FD00, y
          lda       $2E00, y
          sta       $FE00, y
          lda       $2F00, y
          sta       $FF00, y
          iny
          beq       @2
          jmp       @1
@2:       rts

          .asciiz   "hacked by usotsuki"

          .res      $1000-*, $EA
          .incbin   "monrom.bin"