disjaukifa Posted August 28, 2011 Share Posted August 28, 2011 (edited) Hey Guys, Trying to find the right combination to get a titlescreen working with a DPC+ and titlescreens work together? I can get one working or another but not both which is annoying. Any help would be greatly appreciated. Thanks Edited August 28, 2011 by disjaukifa Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 28, 2011 Share Posted August 28, 2011 Did you use the info posted here: http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/ It looks like the DPC+ kernel doesn't define the "scorepointer" variables like the other kernels, and many of the titlescreen minikernels rely on them. If you're using the DPC+ kernel, add the following line to your basic: const scorepointers=player1x 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 (edited) Did you use the info posted here: http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/ It looks like the DPC+ kernel doesn't define the "scorepointer" variables like the other kernels, and many of the titlescreen minikernels rely on them. If you're using the DPC+ kernel, add the following line to your basic: const scorepointers=player1x Umm . . . no somehow I missed that. Thanks Random I'll try that right now. Last might my Kung Fu just wasn't liking me at all Edited August 28, 2011 by disjaukifa Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 Ok Here is my basic basic code for just the title screen, which works: rem Original code by RevEng rem http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel rem *** any romsize should work set romsize 16k rem *** The selected game number. The game selection minikernel displays rem *** this variable dim gamenumber=a rem *** this debounce variable is used to slow down the game number selection dim swdebounce=b rem *** this turns on the score fading effect. it looks especially pretty rem *** if you do a "scorecolor=scorecolor+1" every 2nd or 4th frame. const scorefade=1 scorecolor=$1a swdebounce=0 gamenumber=1 titlepage gosub titledrawscreen bank2 if joy0fire || switchreset then goto gamestart if !switchselect then swdebounce=0 if swdebounce>0 then swdebounce=swdebounce-1: goto titlepage if switchselect then swdebounce=30: gamenumber=gamenumber+1:if gamenumber=21 then gamenumber=1 goto titlepage rem *** Our fake game start. If you move the joystick it goes back to the rem *** title screen. gamestart drawscreen if joy0left || joy0right then goto titlepage if joy0up || joy0down then goto titlepage goto gamestart bank 2 rem *** We're putting the title kernel here, but it can go in any bank you rem *** like. Just don't let your program flow accidentally fall into the rem *** line below. asm include "titlescreen/asm/titlescreen.asm" end The above code works perfectly. However when I modify to be the following rem Original code by RevEng rem http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel bank 1 temp1=temp1 rem *** any romsize should work set romsize 32k; set kernel DPC+; set smartbranching on; set optimization inlinerand; set kernel_options collision(playfield, player1); const rem *** The selected game number. The game selection minikernel displays rem *** this variable dim gamenumber=a rem *** this debounce variable is used to slow down the game number selection dim swdebounce=b rem *** this turns on the score fading effect. it looks especially pretty rem *** if you do a "scorecolor=scorecolor+1" every 2nd or 4th frame. const scorefade=1 scorecolor=$1a swdebounce=0 gamenumber=1 titlepage gosub titledrawscreen bank2 if joy0fire || switchreset then goto gamestart if !switchselect then swdebounce=0 if swdebounce>0 then swdebounce=swdebounce-1: goto titlepage if switchselect then swdebounce=30: gamenumber=gamenumber+1:if gamenumber=21 then gamenumber=1 goto titlepage rem *** Our fake game start. If you move the joystick it goes back to the rem *** title screen. gamestart drawscreen if joy0left || joy0right then goto titlepage if joy0up || joy0down then goto titlepage goto gamestart bank 2 temp1=temp1 rem *** We're putting the title kernel here, but it can go in any bank you rem *** like. Just don't let your program flow accidentally fall into the rem *** line below. asm include "titlescreen/asm/titlescreen.asm" end I just get a slew of random sprites on the top of the screen. Honestly I'm not completely convinced that I haven't setup everything correctly in Visual bB. I've been working on this all last night and this morning and I just can't seem to figure it out. Any help would be great. Thank you! Quote Link to comment Share on other sites More sharing options...
jwierer Posted August 28, 2011 Share Posted August 28, 2011 See if this works. rem Original code by RevEng rem [url="http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel"]http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel[/url] rem *** any romsize should work set kernel DPC+ goto StartInBank2 bank2 bank 2 const scorepointers=player1x temp1 = temp1 StartInBank2 rem *** The selected game number. The game selection minikernel displays rem *** this variable dim gamenumber=a rem *** this debounce variable is used to slow down the game number selection dim swdebounce=b rem *** this turns on the score fading effect. it looks especially pretty rem *** if you do a "scorecolor=scorecolor+1" every 2nd or 4th frame. const scorefade=1 scorecolor=$1a swdebounce=0 gamenumber=1 titlepage gosub titledrawscreen bank3 if joy0fire || switchreset then goto gamestart if !switchselect then swdebounce=0 if swdebounce>0 then swdebounce=swdebounce-1: goto titlepage if switchselect then swdebounce=30: gamenumber=gamenumber+1 if gamenumber=21 then gamenumber=1 rem *** make bmp_gameselect color-cycle bmp_gameselect_color = bmp_gameselect_color + 1 goto titlepage rem *** Our fake game start. If you move the joystick it goes back to the rem *** title screen. gamestart drawscreen if joy0left || joy0right then goto titlepage if joy0up || joy0down then goto titlepage goto gamestart bank 3 rem *** We're putting the title kernel here, but it can go in any bank you rem *** like. Just don't let your program flow accidentally fall into the rem *** line below. asm include "titlescreen/asm/titlescreen.asm" end bank 4 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 See if this works. rem Original code by RevEng rem [url="http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel"]http://www.atariage.com/forums/topic/169819-the-titlescreen-kernel/page__hl__titlescreen%20kernel[/url] rem *** any romsize should work set kernel DPC+ goto StartInBank2 bank2 bank 2 const scorepointers=player1x temp1 = temp1 StartInBank2 rem *** The selected game number. The game selection minikernel displays rem *** this variable dim gamenumber=a rem *** this debounce variable is used to slow down the game number selection dim swdebounce=b rem *** this turns on the score fading effect. it looks especially pretty rem *** if you do a "scorecolor=scorecolor+1" every 2nd or 4th frame. const scorefade=1 scorecolor=$1a swdebounce=0 gamenumber=1 titlepage gosub titledrawscreen bank3 if joy0fire || switchreset then goto gamestart if !switchselect then swdebounce=0 if swdebounce>0 then swdebounce=swdebounce-1: goto titlepage if switchselect then swdebounce=30: gamenumber=gamenumber+1 if gamenumber=21 then gamenumber=1 rem *** make bmp_gameselect color-cycle bmp_gameselect_color = bmp_gameselect_color + 1 goto titlepage rem *** Our fake game start. If you move the joystick it goes back to the rem *** title screen. gamestart drawscreen if joy0left || joy0right then goto titlepage if joy0up || joy0down then goto titlepage goto gamestart bank 3 rem *** We're putting the title kernel here, but it can go in any bank you rem *** like. Just don't let your program flow accidentally fall into the rem *** line below. asm include "titlescreen/asm/titlescreen.asm" end bank 4 With that code I get the following in my console in Visual bB: Compile started at 8/28/2011 11:50:03 AM Compiling C:\Atari2600\Atomic_Meltdown\test.bas DASM V2.20.07, Macro Assembler ©1988-2003 free ram: 0 2600basic_variable_redefs.h (9): error: EQU: Value mismatch. old value: $00c6 new value: $0085 $17ca bytes of ROM space left in bank 1 bytes of ROM space left in bank 2 bytes of ROM space left in bank 3 bytes of ROM space left in bank 4 bytes of ROM space left in bank 5 bytes of ROM space left in bank 6 bytes of ROM space left in graphics bank --> scorepointers 0085 free ram: 0 2600basic_variable_redefs.h (9): error: EQU: Value mismatch. old value: $00c6 new value: $0085 $17ca 1839 bytes of ROM space left in bank 1 3753 bytes of ROM space left in bank 2 1158 bytes of ROM space left in bank 3 3924 bytes of ROM space left in bank 4 3924 bytes of ROM space left in bank 5 3924 bytes of ROM space left in bank 6 3668 bytes of ROM space left in graphics bank Errors were encountered during assembly. 2600 Basic compilation completed. Compilation completed at 8/28/2011 11:50:03 AM view output file:///C:/Atari2600/Atomic_Meltdown/bin Post compilation files deleted Quote Link to comment Share on other sites More sharing options...
jwierer Posted August 28, 2011 Share Posted August 28, 2011 I wonder if you just don't have the very lastest bB setup. This is what I have on my machine (back yours up first). bb11d.zip -Jeff 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 I wonder if you just don't have the very lastest bB setup. This is what I have on my machine (back yours up first). bb11d.zip -Jeff Now i'm getting the following: Compile started at 8/28/2011 12:19:45 PM Compiling C:\Atari2600\Atomic_Meltdown\test.bas DASM V2.20.07, Macro Assembler ©1988-2003 free ram: 9 DPC free RAM= bytes of ROM space left in bank 1 bytes of ROM space left in bank 2 bytes of ROM space left in bank 3 bytes of ROM space left in bank 4 bytes of ROM space left in bank 5 bytes of ROM space left in bank 6 bytes of ROM space left in graphics bank free ram: 9 DPC free RAM= 603 105 bytes of ROM space left in bank 1 3721 bytes of ROM space left in bank 2 1158 bytes of ROM space left in bank 3 3923 bytes of ROM space left in bank 4 3923 bytes of ROM space left in bank 5 3923 bytes of ROM space left in bank 6 3628 bytes of ROM space left in graphics bank free ram: 9 DPC free RAM= 603 105 bytes of ROM space left in bank 1 3721 bytes of ROM space left in bank 2 1158 bytes of ROM space left in bank 3 3923 bytes of ROM space left in bank 4 3923 bytes of ROM space left in bank 5 3923 bytes of ROM space left in bank 6 3628 bytes of ROM space left in graphics bank --- Unresolved Symbol List bmp_96x2_2_index 0000 ???? (R ) bmp_96x2_1_index 0000 ???? (R ) bmp_48x1_1_index 0000 ???? (R ) bmp_96x2_2_fade 0000 ???? (R ) bmp_96x2_1_fade 0000 ???? (R ) DPC_kernel_options 0000 ???? (R ) mk_gameselect_on 0000 ???? (R ) font 0000 ???? (R ) 0.title_vblank 0000 ???? (R ) mk_score_on 0000 ???? (R ) mk_48x2_1_on 0000 ???? (R ) mk_48x2_2_on 0000 ???? (R ) mk_48x1_2_on 0000 ???? (R ) bmp_gameselect_color 0000 ???? (R ) mk_96x2_3_on 0000 ???? (R ) mk_48x2_3_on 0000 ???? (R ) mk_48x1_3_on 0000 ???? (R ) Fatal assembly error: Source is not resolvable. Errors were encountered during assembly. 2600 Basic compilation completed. Compilation completed at 8/28/2011 12:19:46 PM view output file:///C:/Atari2600/Atomic_Meltdown/bin Post compilation files deleted Quote Link to comment Share on other sites More sharing options...
RevEng Posted August 28, 2011 Share Posted August 28, 2011 You haven't dimmed a variable for "bmp_gameselect_color", but you're using it in your code. I added a dim for this variable and it compiled for me. Whenever I run across compile errors I look over the unresolved symbol list. There's a lot of false-alarms (symbols that would have resolved had the compilation gone further, or symbols that don't actually need to resolve) but often the reason for the compile error is there... --- Unresolved Symbol List bmp_96x2_2_index 0000 ???? (R ) bmp_96x2_1_index 0000 ???? (R ) bmp_48x1_1_index 0000 ???? (R ) bmp_96x2_2_fade 0000 ???? (R ) bmp_96x2_1_fade 0000 ???? (R ) DPC_kernel_options 0000 ???? (R ) mk_gameselect_on 0000 ???? (R ) font 0000 ???? (R ) 0.title_vblank 0000 ???? (R ) mk_score_on 0000 ???? (R ) mk_48x2_1_on 0000 ???? (R ) mk_48x2_2_on 0000 ???? (R ) mk_48x1_2_on 0000 ???? (R ) bmp_gameselect_color 0000 ???? (R ) mk_96x2_3_on 0000 ???? (R ) mk_48x2_3_on 0000 ???? (R ) mk_48x1_3_on 0000 ???? (R ) 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 You haven't dimmed a variable for "bmp_gameselect_color", but you're using it in your code. I added a dim for this variable and it compiled for me. Whenever I run across compile errors I look over the unresolved symbol list. There's a lot of false-alarms (symbols that would have resolved had the compilation gone further, or symbols that don't actually need to resolve) but often the reason for the compile error is there... --- Unresolved Symbol List bmp_96x2_2_index 0000 ???? (R ) bmp_96x2_1_index 0000 ???? (R ) bmp_48x1_1_index 0000 ???? (R ) bmp_96x2_2_fade 0000 ???? (R ) bmp_96x2_1_fade 0000 ???? (R ) DPC_kernel_options 0000 ???? (R ) mk_gameselect_on 0000 ???? (R ) font 0000 ???? (R ) 0.title_vblank 0000 ???? (R ) mk_score_on 0000 ???? (R ) mk_48x2_1_on 0000 ???? (R ) mk_48x2_2_on 0000 ???? (R ) mk_48x1_2_on 0000 ???? (R ) bmp_gameselect_color 0000 ???? (R ) mk_96x2_3_on 0000 ???? (R ) mk_48x2_3_on 0000 ???? (R ) mk_48x1_3_on 0000 ???? (R ) YESSS!!!! Thank you RevEng!!! That worked, that worked out perfectly! So it seems that I was using the wrong version of bB and had some funky code as well, and some bits that I need to just initialize. Thanks guys, I really appreciate all the help, been scratching my head for hours over this one. Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 (edited) Ok, Just wanting to get a bit of clarification here. If you use DPC+ Kernel, I've noticed the following things: Can't use banks 1, 7, 8 right? 7 and 8 are reserved for graphics and well I have no idea what bank 1 is used for but it seems like we can't use it either, so that leaves use with banks 2, 3, 4, 5, 6, right??? Trying to wrap my head around all of this. Also I know with the DPC+ Kernel sprites can now be 16 pixels tall, is there a width restraint? Thanks Disjaukifa Edited August 28, 2011 by disjaukifa Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted August 28, 2011 Share Posted August 28, 2011 Also I know with the DPC+ Kernel sprites can now be 16 pixels tall, is there a width restraint? Sprites could always be much taller than that. As far as I know, they could be up to 255 pixels high. 1 Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted August 28, 2011 Share Posted August 28, 2011 (edited) The DPC+ gives you 6 banks to work with, however bank6 is reserved for GFX data, so anything placed there has the chance to be overwritten without notice. Also you don't have to declare set romsize 32k when using the DPC+ as it sets the rom size to 32k regardless. The template I shared with you in the Atomic Meltdown thread should get things compiling right out of the box. Your not forced to use it of course, but it takes in mind all the current needed quirk workarounds to avoid future headaches. I recommend using that template and just filling in the needed areas as mentioned in it. There shouldn't be a need to modify any of the template code settings for even the most advanced DPC+ games to work. Sprites can be 192 visible pixels tall, 255 max. Also can be no wider than 16 pixels (using P0+P1 set next to each other manually) without flicker. Flicker will start showing as soon as a virtual player 2-9 is within 5 scanlines of P1, and thus with flicker you can get larger sprites but they look bad. Edited August 28, 2011 by ScumSoft 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 The DPC+ gives you 6 banks to work with, however bank6 is reserved for GFX data, so anything placed there has the chance to be overwritten without notice. Also you don't have to declare set romsize 32k when using the DPC+ as it sets the rom size to 32k regardless. The template I shared with you in the Atomic Meltdown thread should get things compiling right out of the box. Your not forced to use it of course, but it takes in mind all the current needed quirk workarounds to avoid future headaches. I recommend using that template and just filling in the needed areas as mentioned in it. There shouldn't be a need to modify any of the template code settings for even the most advanced DPC+ games to work. Sprites can be 192 visible pixels tall, 255 max. Also can be no wider than 16 pixels (using P0+P1 set next to each other manually) without flicker. Flicker will start showing as soon as a virtual player 2-9 is within 5 scanlines of P1, and thus with flicker you can get larger sprites but they look bad. Thank you ScumSoft, turned out a huge part of my problems where I had the wrong beta verions of bB installed which was causing my problems left and right. I've got your template saved, I'm going to start to move everything towards it. So just for clarification . . . mostly for me, I can't use banks 1, 6 and which else? Thanks guys for the help on this stuff. Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted August 28, 2011 Share Posted August 28, 2011 (edited) You can use bank1 for initializing the startup stuff, but it's limited in space to less than 100 bytes I think. Bank6 can be used for routines if needed, but this is supposed to be reserved for graphics only. If you place code here you run the risk of having it written over since this bank is writable. I have yet to encounter this though and I use it for my titlescreen which frees up space in other banks. [edit]Almost forgot, banks 2,3,4, and 5 are completely free for normal usage. Edited August 28, 2011 by ScumSoft 1 Quote Link to comment Share on other sites More sharing options...
disjaukifa Posted August 28, 2011 Author Share Posted August 28, 2011 You can use bank1 for initializing the startup stuff, but it's limited in space to less than 100 bytes I think. Bank6 can be used for routines if needed, but this is supposed to be reserved for graphics only. If you place code here you run a risk of having it written over since this bank is writable, although I have yet to encounter this and I use it for my titlescreen which frees up space in other banks. [edit]Almost forgot, banks 2,3,4, and 5 are completely free for normal usage. Well great news, I have my code working on your template with the correct version of bB!!! I've put the title screen in bank6 and it seems to be alright so I'm not too worried about it. Random Terrain, RevEng, ScumSoft, jwierer, I want to personally thank you for all your help, I'm not the best programmer out there, and I make mistakes and as it turned out last night and this morning I had so many thing that were wrong it was pitfall!!! So again thank you all for your help! -Disjaukifa 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.