Jump to content
IGNORED

Player Missile Graphics 2 and 3 Issue


Recommended Posts

I'm having issues with the following code. Players 0 and 1 display a vertical line as expected, but players 2 and 3 appear to just display in the border area at the very top and very bottom. Does anyone know what is causing this?

    PMBASELOC = $8000
    M = $8300
    P0 = $8400
    P1 = $8500
    P2 = $8600
    P3 = $8700
    PCOLR0 = 704
    PCOLR1 = 705
    PCOLR2 = 706
    PCOLR3 = 707
    COLOR2 = 710 ;playfield
    COLOR4 = 712 ;border
    HPOSP0 = $D000
    HPOSP1 = $D001
    HPOSP2 = $D002
    HPOSP3 = $D003
    PMBASE = $D407
    SDMCTL = $22F
    GRACTL = $D01D

    *= $9000

INIT
    lda #0
    sta PCOLR0
    sta PCOLR1
    sta PCOLR2
    sta PCOLR3
    lda #176
    sta COLOR2
    sta COLOR4
    lda #PMBASELOC/256
    sta PMBASE
    lda #62
    sta SDMCTL
    lda #3
    sta GRACTL
    lda #50
    sta HPOSP0
    lda #100
    sta HPOSP1
    lda #150
    sta HPOSP2
    lda #200
    sta HPOSP3

CLRPM1
    lda #0
    tax
CLRPM2
    sta P0, x
    sta P1, x
    sta P2, x
    sta P3, x
    inx
    bne CLRPM2

SETPM01
    lda #255
    ldx #0
SETPM02
    sta P0, x
    sta P1, x
    sta P2, x
    sta P3, x
    inx
    iny
    cpy #255
    bne SETPM02

END
    jmp END

Link to comment
Share on other sites

Yes, GPRIOR did the trick. Silly default, IMO.

 

Now why do I still get a solid line with the following section code? I made sure to clear the memory first. It should draw for 10 lines, then jump 10 lines, draw 10 lines...

SETPM01
    lda #255
    ldx #0
SETPM02
    sta P0, x
    sta P1, x
    sta P2, x
    sta P3, x
    inx
    iny
    cpy #10
    bne SETPM02
    txa
    clc
    adc #10
    tax
    ldy #0
    lda #255
    cpx #240
    bne SETPM02
Link to comment
Share on other sites

I got another question, so I will just tack it onto this thread.

 

I tried using the following code to hide the cursor, but it still shows. Per Mapping The Atari, I am updating the cursor position to actually hide the cursor, but it is still showing. I also tried using 1 instead of 2 and it still didn't work. CRSINH is 752, ROWCRS is 84 and COLCRSL is 85.

    lda #2
    sta CRSINH ; hide cursor
    sta ROWCRS ; update cursor pos to actually hide cursor
    sta COLCRSL
Link to comment
Share on other sites

I don't think just storing coordinates works, since this on its own doesn't move the cursor. You actually have to send a character to the screen (such as ATASCII 125 to clear it). POKE 752,1 works in BASIC because immediate mode commands cause writes to the screen editor.

Edited by flashjazzcat
Link to comment
Share on other sites

Those examples are fine but you'd be better off merging them into your own program (they're intended to be assembled with the Assembler Editor or similar, so the first bit of code is still at $5000 when you assemble the second part). So you should INCLUDE the "PRNTSC" routine when assembling your program, and this will enable you to JSR to it at the appropriate points. You can remove the "*=$5000" if you're merging this code with your own program, since you should set the origin at the top of your own code.

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...