Thelen Posted January 17, 2003 Share Posted January 17, 2003 I was doing some little experiments on the atari 8 bit, but it just won't work.. Is it possible to change a color register multiple times on the same scanline ? I was thinking it should be possible. let's say change the background color 10 times on the same scanline : sta wsync ldx #0 loop stx colbk inx cpx #10 bne loop and I run this from in a DLI is this possinle ? and how ? Thanks, Thelen Quote Link to comment Share on other sites More sharing options...
emkay Posted January 17, 2003 Share Posted January 17, 2003 Are you using an Emulator? Maybe the Emulatior is not able to do so... On the real ATARI multiple colorchanging in one scanline is no problem. Quote Link to comment Share on other sites More sharing options...
Thelen Posted January 17, 2003 Author Share Posted January 17, 2003 I've tested it on the emulator and on the real hardware, but i don't understand how to do it.... ? Thelen Quote Link to comment Share on other sites More sharing options...
DEBRO Posted January 17, 2003 Share Posted January 17, 2003 What are your results? Do you see any change at all? Are you setting the shadow register? You can't set the shadow register in a DLI. You must set the register directly. The shadows get moved during VBLANK (if you didn't override it ). So if you set the shadow you won't see the change. Quote Link to comment Share on other sites More sharing options...
Thelen Posted January 17, 2003 Author Share Posted January 17, 2003 yes i'm using the hardware register, COLBK $D01A, but i get no color variation on the same scanline, only at the scanlines underneath..... Thelen Quote Link to comment Share on other sites More sharing options...
DEBRO Posted January 17, 2003 Share Posted January 17, 2003 yes i'm using the hardware register, COLBK $D01A, but i get no color variation on the same scanline, only at the scanlines underneath..... Thelen Hmmm...I wonder if it's a timing issue. ANTIC takes up some cycles from the CPU. What graphics mode are you using? I think I remember seeing this too. I was exerimenting with changing colors and the display list in the middle of a scanline. I later found that changing the display list wasn't possible Now I remember...look at Atari Graphics and Arcade Game Design-Chapter 6. They have an example of doing this. Quote Link to comment Share on other sites More sharing options...
Thelen Posted January 17, 2003 Author Share Posted January 17, 2003 Thanks, but that's not what i'm looking for, that example changes the screencolor only once. I want to change the color register a few times on the same scanline, so that on one scanline the background has multiple colors Thelen Quote Link to comment Share on other sites More sharing options...
DEBRO Posted January 17, 2003 Share Posted January 17, 2003 Thanks, but that's not what i'm looking for, that example changes the screencolor only once. I want to change the color register a few times on the same scanline, so that on one scanline the background has multiple colors Thelen It should give some background on timing issues, though. I think this is where I read about ANTIC stealing some of the CPU cycles. It may have been De Re Atari, I can't remember. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted January 17, 2003 Share Posted January 17, 2003 hmmm... maybe you don't see the changes????? what kind of gfx mode are you in? imagine a gr.0 screen than you don't see the changes as you are probably "behind" the text screen area... dli pha sta wsync lda #$0f sta wsync sta $d01a nop nop nop nop nop nop lda #$00 sta $d01a nop nop nop nop nop nop nop lda #$0f sta $d01a pla rti should give you at least something to see... i must admit that i havent tested the code... hve Quote Link to comment Share on other sites More sharing options...
Thelen Posted January 21, 2003 Author Share Posted January 21, 2003 Thanks man( I didn't have time to test it before) it works, but the color changed only 1 time on the scanline.....i want at leat three and I am using XASM, and it says to me : WARNING professional loader needed, what does that mean ? Thanks, Thelen Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted January 21, 2003 Share Posted January 21, 2003 thelen, you can put as much color changes in one line as you have cpu cycles left which means as much cpu power... the rasterbeam of the monitor is running from left two right so you have just this time and you have to consider that all commands need execution time themself.... while loading the accumulator the rasterbeam is moving but you haven't written any value to the color register ergo you can not see anything... so if you want to change severl times the color try this: lda #color1 sta wsync ; sync sta $d018 lda #color2 sta $d018 lda #color3 sta $d018 lda #color4 sta $d018 ... pla rti be creative...what makes me wonder is for what do you need this routine??? maybe there is a quicker and easier way to do it... re: professional loader... the xasm tool XBOOT generates an ATR image with your EXE file and includes automaticly an boot-loader so you can easily test it with an emulator. in standard mode a "normal" loader is included and the atari operating system (OS) is not switched off... therefore all VBL and rom routines work... for "real" hardcore demo coding or game coding it's good to switch off the OS/ROM completly as you have more zeropage variables etc left and more RAM. an example: the color registers like 708,709,710,712 are mapped by the OS into the GTIA registers $d016, ... $d01a. why is XASM suggestion you the professional loader? i guess your program is positioned & assembled into an area which is normaly used by the OS. so it would be better to use the /P flag to put the "professional" loader & the XASM kernel routines with minimum OS routines... check your ORG statement... XASM filename XBOOT /p filename hve Quote Link to comment Share on other sites More sharing options...
Thelen Posted January 22, 2003 Author Share Posted January 22, 2003 Yes you're right Heaven, I did move some code from $B000 to $C000, just to get some screen data temporaly moved...Thanks, i was thinking 'Professional' ) Thanks, Thelen 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.