Wrathchild Posted September 25, 2004 Share Posted September 25, 2004 OK, this code, for the Atari 8-bit, demonstrates one technique of scrolling a Graphics 12 area without using HW scroll registers. It predefines 7 fonts with the same pattern for each character. The screen is arranged as 24 lines of 32 characters wide. This means that 6 fonts are visible initially, 4 lines each giving the 4*32 = 128 characters of the font. As this scrolls, the 7th font becomes visible and then when the 1st font disappears off the top, it re-appears from the bottom. Hence the technique can be expanded upon by using a tile expanding routine to place graphics in the font memory. To demonstrate that I setup a small piece of mainly code to animate the 1st character of fonts 1 and 2 by rotating them down and up respectively. There in lies a mystery. Earlier this worked OK, but in this last incarnation the pattern is not rotating constantly. Therefore I must be overextending an interrupt somewhere? With the alternative method I suggested of copying the first line of data from font to font, I'm a little worried that it would steel too many cycles, therefore indicating that it could only be used when using a smaller window in the vertical. I haven't got time to try that at the moment though :wink: Hope that helps. Mark scroll_test.zip Quote Link to comment Share on other sites More sharing options...
Tezz Posted September 26, 2004 Share Posted September 26, 2004 That's a great help, thanks a lot. It's a very good example of the method I wanted to achieve. In the routine I want to develop from this method, I must ensure that when the screen data scrolls from the bottom to the top, (i.e. when font one reaches the top rather than wrapping round it stops) the 5 fonts defined in the orginal static screen layout are still defined correctly. What I mean is, as the bytes are rotated through the font areas to give the illusion of scrolling, fonts 1-5 end up still defined as they were before running through the "scroll" routine. I don't see any great problem with that, Even for me to do! The code for such a routine is already there wrtten for me. Cheers for that, Really appreciate it. Regards, Tezz. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 26, 2004 Share Posted September 26, 2004 ehm... it seems i do not get it.... what are the pros & cons regarding this method? i mean... using 7 fonts = 7kb just for scrolling? maybe i havent cought the reason for that.... Quote Link to comment Share on other sites More sharing options...
Tezz Posted September 26, 2004 Share Posted September 26, 2004 Hi Heaven, OK to reiterate, the routine trying to acheve here was to vertically scroll a screen layout which had several fonts making it up via DLIs so, there would already be say 5-6 fonts in memory anyway. Therefore the methods used by this routine are fine I think. Unless you have another approach to this? It's seems strange that vertical scrolling with the inclusion of syncronised DLIs dosen't seem to be documented anywhere? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 26, 2004 Share Posted September 26, 2004 tezz...for what kind of game do you need that? bubble bobble? (when level finished/warp?) Quote Link to comment Share on other sites More sharing options...
Tezz Posted September 26, 2004 Share Posted September 26, 2004 Yes it's for BB!! also for menace levels display in the title sequence Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 26, 2004 Share Posted September 26, 2004 tezz... when finished with bb...you could post the source code esp. the sprite engine... next project could be cybernoid... btw. played cybernoid2...very very hard compared to nowadays games... Quote Link to comment Share on other sites More sharing options...
Tezz Posted September 27, 2004 Share Posted September 27, 2004 Heaven/TQAtezz... when finished with bb...you could post the source code esp. the sprite engine... Yeah no problem. I am intending to release all of the sourcecode for my projects when they are complete. btw. played cybernoid2...very very hard compared to nowadays games... Yeah, but not for a long time though !. A lot of the old titles are difficult. Many of the new generation of 3D gamers assume that they are simple and easier because they don't look as flash to their new eyes but we all know better. There's more to gameplay than the inclusion of 3d rotating camera angles and endless FMV footage. There are a lot of new titles which are very well done though in gameplay as well as graphical so not to totally do the new stuff down. The so-called "Retro" gaming is becoming more popular with the next generation though and of course many of the "classic" 2d games are played on mobile phones etc today. There are so many nice C64 titles that a screaming to be converted. I suppose when many of us all here have provided the sources for the various routines like scrolling, music/soundFX, PM overlays, screen mapping utilities etc. etc. the process of developing these conversions will be easier than ever to get into. Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted September 27, 2004 Author Share Posted September 27, 2004 Quedex on a mobile phone... ! Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 3, 2004 Share Posted October 3, 2004 OK, I'm struggling to get the code which was originally posted into XSAM format. After several frustrated attempts I thought it'd be easier to disassemble the binary but without success. I've spent most of the day with this now Can anyone look at the attached listing. I've cleaned up the listing mostly and also even put some of the comments back in place but, it's not totally sorted out from the original disassembly if you are wondering what the mess in the code is. I'm stuck getting this formatted for XASM correctly. I've attached the Dis6502 workspace file also because there is some data I don't recognise starting at label "L320E". I've simply made this into data bytes. I don't know what this is in the disassember. HELP!! xasm_version.zip Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 4, 2004 Share Posted October 4, 2004 2 things which came into my mind browsing through the code: isn't it dta a(adress) instead of dta a adress?` isn't it org $2e0 run _main ? sorry haven't assembled it on my own... or do you get any error mesage? how do you test your code via 800win + load the obx file? or the ATR made by xboot? if xboot then make sure that xboot will not generate the "professional loader" ("/P" parameter) as this will disable the OS and f.e. your "setvbv" will not work... Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 4, 2004 Share Posted October 4, 2004 Hi Heaven, isn't it dta a(adress) instead of dta a adress?` I think both of these are acceptable in XASM, I've seen both used? or maybe I am wrong about that. It is the dta a on the dlist table that XASM complains about. DLIST_TABLE dta a DLIST1, DLIST2, DLIST3, DLIST4 I did also try to bracket this but it still complained. how do you test your code via 800win + load the obx file? or the ATR made by xboot? I test first the generated OBX file in 800Win. I will normally only use Xboot when I've made a significantly large program. org $2e0 run _main Oops, yes I did miss that. if xboot then make sure that xboot will not generate the "professional loader" ("/P" parameter) as this will disable the OS and f.e. your "setvbv" will not work... ah, that's certainly an error I have made if my setvbv will not work. I will make sure I use the /p One of the difficuties I find when disassembling the object file is that there is some unrecognised code at the beginning of the routine. Is some of this generated by Xboot? ; ; Start of code ; org $2E00 RTS LDX #$19 L2E03 LDA VNTP,X STA L320E,X DEX BPL L2E03 JSR L3132 TSX STX L3271 LDA APPMHI STA L3272 LDA APPMHI+1 STA L3273 LDA MEMTOP STA APPMHI LDX MEMTOP+1 STX APPMHI+1 JSR L316C LDA LMARGN STA L3274 LDA #$00 STA LMARGN LDX SHFLOC STX L3273 STA SHFLOC LDA #$FF STA CH LDA #$00 JSR L3120 STA L3254 LDA #$00 JSR L3120 STA L3256 LDA #$00 JSR L3120 STA L3258 JSR L3155 JSR L3175 LDX L3271 TXS LDA L3274 STA LMARGN LDA L3273 STA SHFLOC LDA L3272 STA APPMHI LDA L3273 STA APPMHI+1 LDX #$19 L2E79 LDA L320E,X STA VNTP,X DEX BPL L2E79 INX STX CRSINH RTS LDA APPMHI STA VNTP LDA APPMHI+1 STA VNTP+1 RTS RTS Should I just strip all this out? and start my code at the "_main" label with org $2e0 run _main specified at the end, then use Xboot with /p The original sourcecode kindly supplied by Wrathchild should really point me in the right direction to clean up the code correctly but I keep getting assember error messages? Perhaps you could assemble it in XASM, I have probably missed something very obvious Regards, Tezz. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 4, 2004 Share Posted October 4, 2004 tezz... you should NOT use /p parameter in xboot as this is the switch to actually generate the Pro-loader... instead of the normal one... sorry for not being clear enough about that... the beginning could be xboot-loader but i am not 100% sure how it works because i never touched the loader... Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 4, 2004 Share Posted October 4, 2004 you should NOT use /p parameter in xboot as this is the switch to actually generate the Pro-loader... instead of the normal one... sorry for not being clear enough about that... No worries, your answer was clear, it was me not reading what you have written properly Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 5, 2004 Share Posted October 5, 2004 OK, I'm really baffled by this now? I've removed all the unessasary code at the beginning of the source and I've looked at the original source posted. When I compile my source the "DLIST_TABLE" label returns an error "undefined label" ???? I can't see anything wrong. I guess it's a lot to ask for someone to help to debug this routine so would anyone be able to convert the original source into XASM instead? I can't get my head around the format used in it with all the special assember specific stuff. Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 7, 2004 Share Posted October 7, 2004 Tezz would anyone be able to convert the original source into XASM I guess my request fell on deaf ears. Can anyone tell me which assembler format Wrathchilds code is in? I don't recognise the use of commands such as.. .code .export "abc" .rodata .res 4 Quote Link to comment Share on other sites More sharing options...
Shawn Jefferson Posted October 7, 2004 Share Posted October 7, 2004 Tezz would anyone be able to convert the original source into XASM I guess my request fell on deaf ears. Can anyone tell me which assembler format Wrathchilds code is in? I don't recognise the use of commands such as.. .code .export "abc" .rodata .res 4 It's using ca65 from http://www.cc65.org/ which is the assembler portion of the 8-bit cross compiler/assembler. .code, and .rodata define what segment of memory the following code/data goes into, as defined by the linker config script (usually a .cfg file.) .export "abc" defines the label "abc" for use outside that module. .res 4, I believe reserves 4 bytes of storage space in a segment. CODE is the default segment, so there will probably be a segment directive before this somewhere. Quote Link to comment Share on other sites More sharing options...
Tezz Posted October 8, 2004 Share Posted October 8, 2004 Shawn Jefferson It's using ca65 from http://www.cc65.org/ which is the assembler portion of the 8-bit cross compiler/assembler Thanks for the info, much appreciated. I can progress now! Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted October 8, 2004 Author Share Posted October 8, 2004 If you're using Windows then having Cygwin installed is a good idea, though you can get away with just using a win32 version of 'gnumake'. 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.