Jump to content
IGNORED

Graphics programming issues on A8


Recommended Posts

I can't figure out what I'm doing wrong here. I am just trying to display a simple test bitmap; the pattern 00011011 repeating. I have determined this to be equivalent to $1B. Here's my code:

 

 

 

;bitmap graphics in mode 

*=$3000  ; begin assembly at page $30

;SECTION ONE -- EQUATES

;antic control shadow location equates

sdmctl = $022f  ; direct memory access control -- store 0 here to disable and $22 to enable

sdlstl = $0230  ; display list location lo-byte
sdlsth = $0231  ; display list location hi-byte

;color register equates -- these registers are in CTIA and are write only

color0 = $02c4  ; bit pattern: 01
color1 = $02c5  ; bit pattern: 10
color2 = $02c6  ; bit pattern: 11
color3 = $02c7  ; presently unused
color4 = $02c8  ; bit pattern: 00

;colors

;black  = #$00
;dark_grey  = #$04
;grey  = #$06
;white  = #$0E
;gold  = #$14
;yellow  = #$18
;brown  = #$22
;tan  = #$24
;orange  = #$36
;red  = #$42
;pink  = #$48
;magenta = #$52
;purple  = #$60
;lavender  = #$66
;blue  = #$74
;lt_blue = #$78
;turquoise  = #$A4
;green  = #$C4
;lt_green  = #$C8
;yellow_green  = #$D6
;olive_green  = #$E4
;peach  = #$F6

;display list

*=$4000 ;begin display list on page $40

dlist

.byte $70 , $70 , $70 ;blank 24 scanlines -- 21 mode lines remaining
.byte $48         ;LMS and ANTIC mode 8
.byte $50 , $40   
.byte $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08
.byte $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08 , $08 
.byte $08         ;21 mode lines
.byte $41         ;JVB
.byte $00 , $40       

;bitmap

screen_ram:

*=$4050

.sbyte "testing"


colors:
*=$3150
lda #0
sta color4
lda #$06
sta color0
lda #$04
sta color1
lda #$0E
sta color2




initialize_ANTIC:

lda #0
sta sdmctl
lda $00
sta sdlstl
lda $40
sta sdlsth
lda #$22
sta sdmctlp

Link to comment
Share on other sites

You are missing pound signs on the lda instructions here:

 

lda $00
sta sdlstl
lda $40
sta sdlsth

 

Since I'm only familiar with xasm, I reformatted your code in xasm and generated an executable that way. I'm attaching both.

 

Also, you probably want to put your labels *after* you reset the origin counter with *=X. That way the label will have the value you just set.

apok.zip

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Thanks, that sorted out my issues. Can't believe that was all, especially after reading about a thousand times that this is one of the most common mistakes!

As a beginner assembler programmer (having another bash now with MAC/65 cart ) It's nice seeing these sort of posts and ones with shortish bits of code to look at :thumbsup:

 

Talking of mistakes: here's just 1 - I was editing getting all sorts of undefined errors etc even thought I could see the labels/lines were there! What I'd done was to load my code in after using Text mode to convert another file (Geneisis PMG data from basic lines) and forgot to 'new' before I loaded it. Looking back I though it strange that lower case wasn't getting stored as upper automatically. After re-loading in edit mode and the lines listing ok there must have been something left behind from text mode, I had to re-enter/press return on those I had changed :D

[Might have been a corrupt file but listing and re"enter"ing it seemed to fix it.]

 

p.s. Grelve how's it going ?

Edited by therealbountybob
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...