Jump to content
IGNORED

Looking for Information on this Demo


Just Jeff

Recommended Posts

Here's something I've never seen before. The last bcc and bcs don't point to instructions, only to blank play field data. What does that do?

LF0F1
    sta     VSYNC,x         ; 4
    inx                     ; 2
    bne     LF0F1           ; 2

    ;jmp     LF7A2          ; 3         directly jump to PCM code
    jmp     LF637           ; 3 Go to playfield routines

    beq     LF0CB           ; 2
    bvs     LF0CD           ; 2
    bne     LF10F           ; 2
    cpx     #$10            ; 2
    bne     LF083           ; 2
    cpx     #$B0            ; 2
    bcs     LF127           ; 2
    ldy     #$A0            ; 2
    bcs     LF0BB           ; 2
    bcc     LF0AD           ; 3

Here's what those last two point to:

    .byte   $00 ; |        | $F0AB
    .byte   $00 ; |        | $F0AC
LF0AD:
    .byte   $00 ; |        | $F0AD
    .byte   $00 ; |        | $F0AE
    .byte   $00 ; |        | $F0AF
    .byte   $00 ; |        | $F0B0
    .byte   $00 ; |        | $F0B1
    .byte   $00 ; |        | $F0B2
    .byte   $00 ; |        | $F0B3
    .byte   $00 ; |        | $F0B4
    .byte   $00 ; |        | $F0B5
    .byte   $00 ; |        | $F0B6
    .byte   $00 ; |        | $F0B7
    .byte   $00 ; |        | $F0B8
    .byte   $00 ; |        | $F0B9
    .byte   $00 ; |        | $F0BA
LF0BB:
    .byte   $00 ; |        | $F0BB
    .byte   $00 ; |        | $F0BC
Edited by BNE Jeff
Link to comment
Share on other sites

It looks like unused code to me.

There is no label after the JMP instruction. So unless there is an indirect jump like JMP() or BRK (which doesn't exist in this code), which DiStella cannot detect, this code is never executed. Also all labels of this code are irrelevant.

 

The break vector points to the normal start address.

Link to comment
Share on other sites

$FFFE is a vector, so you must read $FFFF too. Together they point to the start address of the ROM.

 

. = current address, so: . - 1 = current address -1

You can't put a label directly there, because the address is in the middle of the previous instruction.

 

Since this label is addressed from the unused code above only, it makes no sense here.

Link to comment
Share on other sites

Ah.. Didn't know what a vector was. So a vector is kind of like a register for the 6502- right?

 

This has definitely been a worthwhile exercise so far- Learning so much stuff here:

How to use DiStella

you can ROL RAM, not just the accumulator

DiStella can't identify all tables

Little Endian, for like the fourth time

Mirroring

More DiStella characteristics

Local labels and variables

ZP

Break, vector

.-1

and more that doesn't come to mind just now

 

So I did a substantial amount of labeling and got through the graphic stuff well enough, but then when I arrived at the speech? sound routine, it was tough to understand. I also looked through the labeling that you put on the music, and couldn't identify any missing labels. I felt it might be time to focus only on the music. So I chopped out the graphic routines, and the speech, and kept just the music. It compiled without error, but plays garbage.

 

Does anybody feel like taking a look and maybe pointing me in the right direction? I know that the break vector is not correct, but when I changed it, to 00, f0 I think, nothing changed so I changed it back. Not sure if I'm even using it.

 

Thanks once again!

 

xx.asm

Link to comment
Share on other sites

OK Thanks.. Seems strange that we can't just ORG $fffe then .word start

 

Right now I'm trying to cut it down to a 2K file. I:

changed the first ORG to $f800

removed ORG $f967

 

It half worked. Played the first song, not the second.

If I leave ORG $f967 I get a compile error- reverse indexed.

I thought it might be a page boundary thing but an align 256 didn't help

 

At this point I'm wondering why it would need to be in there. Somewhere a pointer is off by $800 I suppose?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...