C64 ML Code Thing

Anything you like and probably not related to Bard's Tale
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

So I know what I want the program to do, but I have no idea how to do it.

I want it to read the file that has the item data - load it into memory, or just load the bytes related to item #1, then on keypress load the bytes related to the next item...but this completely eludes me.

I have this code:

Code: Select all

.C:c0d2  A9 02       LDA #$02
.C:c0d4  A2 08       LDX #$08
.C:c0d6  A0 01       LDY #$01
.C:c0d8  20 BA FF    JSR $FFBA
.C:c0db  A9 07       LDA #$07
.C:c0dd  A2 4E       LDX #$4E
.C:c0df  A0 C3       LDY #$C3
.C:c0e1  20 BD FF    JSR $FFBD
.C:c0e4  A0 00       LDY #$00
.C:c0e6  A2 10       LDX #$40
.C:c0e8  A9 00       LDA #$00
.C:c0ea  20 D5 FF    JSR $FFD5
.C:c0ed  60          RTS
It sets up the logical file as #2, selects drive 8, and secondary address of 01, then finds the filename "uncoata", then I specify to load it in $4000. It reads from track 21 to track 23, then clears the screen and just hangs. After 2 or 3 minutes the screen turns pink and keeps hanging infinitely.

:?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

So the code starting with $0200 huh.

Are you certain?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

Okay. So.

I been trying to follow the code and have the following thus far.

Code: Select all

.C:0200  4C 3E FC    JMP $FC3E

.C:fc3e  78          SEI
.C:fc3f  8D 3A FB    STA $FB3A
.C:fc42  8D 3E FB    STA $FB3E
.C:fc45  C9 F0       CMP #$F0
.C:fc47  D0 04       BNE $FC4D
.C:fc49  A2 00       LDX #$00
.C:fc4b  A0 12       LDY #$12
.C:fc4d  8C 3F FB    STY $FB3F
.C:fc50  4D 3F FB    EOR $FB3F
.C:fc53  8E 40 FB    STX $FB40
.C:fc56  4D 40 FB    EOR $FB40
.C:fc59  8D 41 FB    STA $FB41
.C:fc5c  AD 00 DD    LDA $DD00		CIA 2 - Port A serial access bus	0110011
.C:fc5f  29 03       AND #$03		00000011
.C:fc61  85 02       STA $02		#$03
.C:fc63  8D EC FD    STA $FDEC
.C:fc66  8D F6 FD    STA $FDF6
.C:fc69  8D 19 FE    STA $FE19
.C:fc6c  8D 27 FE    STA $FE27
.C:fc6f  09 20       ORA #$20		#$00
.C:fc71  8D 00 DD    STA $DD00		VIC Bank 3
.C:fc74  AD 11 D0    LDA $D011		Screen control registers #1	#$3B 00111011
.C:fc77  29 07       AND #$07		00000111	>	00000011	#$03
.C:fc79  18          CLC		
.C:fc7a  69 2E       ADC #$2E		Add with carry 
.C:fc7c  8D FD FD    STA $FDFD		#$31
.C:fc7f  8D 96 FD    STA $FD96		#$31
.C:fc82  EE 96 FD    INC $FD96		#$32
Am I anywhere near on the right track?
Weber G
Posts: 125
Joined: Tue Dec 15, 2020 9:58 am

Re: C64 ML Code Thing

Post by Weber G »

Yes, that is the start of the code.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

Weber G wrote: Tue Jan 26, 2021 7:00 am Yes, that is the start of the code.
And at which point does it begin to do what I'm looking for?
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

I've decided this is more effort than it's worth.
Weber G
Posts: 125
Joined: Tue Dec 15, 2020 9:58 am

Re: C64 ML Code Thing

Post by Weber G »

And at which point does it begin to do what I'm looking for?
Appr. 100 lines to load/ save from disk and check for the right disk.
I've decided this is more effort than it's worth.
I told you at the beginning of this topic.
User avatar
Darendor
Posts: 1502
Joined: Wed Jan 14, 2009 1:53 am
Location: Red Deer, Alberta, Canada

Re: C64 ML Code Thing

Post by Darendor »

Whatever you say, bud.
Post Reply