dr_apokalypse Posted January 20, 2013 Share Posted January 20, 2013 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 Quote Link to comment Share on other sites More sharing options...
Xuel Posted January 20, 2013 Share Posted January 20, 2013 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 Quote Link to comment Share on other sites More sharing options...
dr_apokalypse Posted February 1, 2013 Author Share Posted February 1, 2013 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! Quote Link to comment Share on other sites More sharing options...
+therealbountybob Posted February 14, 2013 Share Posted February 14, 2013 (edited) 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 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 [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 February 23, 2013 by therealbountybob Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted February 18, 2013 Share Posted February 18, 2013 Is it not LDA #$40 sta dlisth or better Lda #<dlist Sta sdlistl lda #>dlist Sta sdlisth Your LDA $00 and LDA $40 are reading the contains of address $00 and $40 like PEEK? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.