GadgetUK Posted January 12, 2013 Share Posted January 12, 2013 (edited) Is there a way to point Suzi to another address for the Back Buffer? Ie. instead of Suzi blitting/painting to the default location of the back buffer, is thete a word in RAM that dictates where she outputs? I want to point it to another fullscreen sized bitmap in order that I can permenantly affect that bitmap and avoid having to keep redrawing particular sprites? The alternatve would be to use Mikey to copy the bitmap manually to the dest bitmap but thats not as elegant and will eat a lot of cycles... Edited January 12, 2013 by GadgetUK Quote Link to comment Share on other sites More sharing options...
sage Posted January 12, 2013 Share Posted January 12, 2013 Maybe I have a problem with your definition of the word "back buffer". You can set any of the buffers to any memory location (in muliplies of i thing 16 or so, read the docs to be sure). If you want to write to the buffers by cpu, you should be sure thast you do not overlap with the suzy/mikey space _or_ switch of the overlay. If you want to modify a sprite which you use a background sprite you have to take care about the additional end of line bytes in the literal sprite. apart from that, this is the mechanism which I use. Modifing the screen buffer is in most cases not the bet way to go. Suzy Address space (part of): L1 (CPU) 04,05 H0FFL,H 0ffset to H edge of screen H1 (CPU) 06,07 V0FFL,H 0ffset to V edge of screen L2 (CPU) 08,09 VIDBASL,H Base Address of Video Build Buffer H2 (CPU) 0A,0B COLLBASL,H Base Address of Coll Build Buffer L3 (ENG) 0C,0D VIDADRL,H Current Video Build Address H3 (ENG) 0E,0F COLLADR,LH Current Collision Build Address Quote Link to comment Share on other sites More sharing options...
solidcorp Posted January 12, 2013 Share Posted January 12, 2013 I'm not sure if these do what I think they do but I think they do From http://www.monlynx.de/lynx/hardware.html $FC08,$FC09 VIDBASL,H Base Address of Video Build Buffer $FC0C,$FC0D VIDADRL,H Current Video Build Address There are similar values for the collision buffer. Quote Link to comment Share on other sites More sharing options...
GadgetUK Posted January 12, 2013 Author Share Posted January 12, 2013 Excellent, thanks, i've book marked that page - that's just what I was looking for. Quote Link to comment Share on other sites More sharing options...
solidcorp Posted January 12, 2013 Share Posted January 12, 2013 Also check pages 15 & 16 in the Handy Specification from AA here - that is where I learned it all. (I use the Windows Picture and Fax viewer to see the multipage tif) Quote Link to comment Share on other sites More sharing options...
+karri Posted January 13, 2013 Share Posted January 13, 2013 In the tgi driver you can also decide not to call tgi_updatedisplay. Then you can build your static backgrounds to screen1 and keep screen0 as the display buffer always. A simple: void bgcopy() { asm("sei"); asm("lda #$0f"); asm("sta $fff9"); memcpy(0xc038, 0xe018, 8160); asm("lda #$0c"); asm("sta $fff9"); asm("cli"); } Will the initialize the screen with the background. Quote Link to comment Share on other sites More sharing options...
vince Posted February 4, 2013 Share Posted February 4, 2013 (also, i've made a french version of the official doc http://devlynx.ti-fr.com/?pag=9, with registers sorted by adress with a detail page by address : http://devlynx.ti-fr.com/?pag=17&act=all ) Quote Link to comment Share on other sites More sharing options...
GadgetUK Posted February 6, 2013 Author Share Posted February 6, 2013 (edited) Thanks! My idea orignally was to try and use Suzi to blit sprites directly to a 'background' bitmap in elsewhere in RAM but sounds like Suzi deals with fixed destination addresses. Instead I will manually draw to the background bitmap using the CPU. The idea being that when an enemy dies I draw the body or damaged vehicle directly to the main image I am using as a background, and do this once when an enemy dies. The benefit is visual carnage as the bodies and destruction build up, and I wont have to keep drawing dead bodies - no hit in suzi for possibly hundreds of dead sprites. Edited February 6, 2013 by GadgetUK Quote Link to comment Share on other sites More sharing options...
sage Posted February 6, 2013 Share Posted February 6, 2013 Thanks! My idea orignally was to try and use Suzi to blit sprites directly to a 'background' bitmap in elsewhere in RAM but sounds like Suzi deals with fixed destination addresses. Suzy is NOT limited to fixed adresses. But its limited to a fixed screen size. I used this background blitting for the rekursive effects in lynx reloaded. But befoe, you have to overwrite the last byte of every line to get a valid literal sprite, therefore it is mostly not the best idea to go that way. Nevertheless, its still faster than doing it in software. Instead I will manually draw to the background bitmap using the CPU. The idea being that when an enemy dies I draw the body or damaged vehicle directly to the main image I am using as a background, and do this once when an enemy dies. The benefit is visual carnage as the bodies and destruction build up, and I wont have to keep drawing dead bodies - no hit in suzi for possibly hundreds of dead sprites. Quote Link to comment Share on other sites More sharing options...
GadgetUK Posted February 6, 2013 Author Share Posted February 6, 2013 OK, thanks! I will try using Suzi to do this if I can work out the ASM in order to temporarily point Suzi to the address of my bitmap. Also understood about writting additional byte at the end of every scanline of a sprite. Thanks =) Quote Link to comment Share on other sites More sharing options...
+karri Posted February 6, 2013 Share Posted February 6, 2013 OK, thanks! I will try using Suzi to do this if I can work out the ASM in order to temporarily point Suzi to the address of my bitmap. Also understood about writting additional byte at the end of every scanline of a sprite. Thanks =) You don't need asm to do this. Define the viewpage as tgi_setviewpage(1); To draw on the background you just do: tgi_setdrawpage(0); draw on the background buffer using normal tgi commands ... tgi_setdrawpage(1); bg_copy(); draw on screen. And do not use tgi_updatedisplay() at all. You will have a little flicker because you lose double buffering. -- Karri 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.