Jump to content
RevEng

The Titlescreen Kernel

Recommended Posts

For some reason my 48x2_4 kernel is drawn three times. Is this normal?

m0ou49x.png

That 2_5 is there because I wanted to know if it's multiplied too, and it's not.

The window and height are exact, and I saw nothing in the .asm files that had to do with the multiplication either (literally checked everything).

What's the problem here?

  • Like 1

Share this post


Link to post
Share on other sites

Not sure if it helps but in the titlescreen folder is an .asm file named "titlescreen_layout.asm" it should only have one listing for each kernel your using

Share this post


Link to post
Share on other sites

What is the syntax to change the 48x2 line colors on the fly? I'd like to animate the colors without having to animate the frame (using index for example.) Just because the frame is large and takes a lot of ROM space, but changing a color pallet is only a few bytes.

Share this post


Link to post
Share on other sites

What is the syntax to change the 48x2 line colors on the fly? I'd like to animate the colors without having to animate the frame (using index for example.) Just because the frame is large and takes a lot of ROM space, but changing a color pallet is only a few bytes.

There isn't a syntax, but you can hack it in.

 

Open the titlescreen/asm/48x2_#_kernel.asm file, where #=whichever copy you want the color to animate for.

 

Remove everything between the second "ifconst bmp_48x2_1_index" line and it's corresponding "endif".

 

With that mod, when you change the index only the color will change.

Share this post


Link to post
Share on other sites

With that mod, when you change the index only the color will change.

 

Hmm. I tried that (only 3 lines to comment out, right?) but the graphic gets corrupted when I change the index. There must be something else referencing the graphics from the index?

Share this post


Link to post
Share on other sites

Okay, changed the window and size to the same value (instead of doubling the height). That keeps the image correct, but when I change the index, the colors look like random data.

 

EDIT: Got it! Changed the window to half the size of the height. Changed the last lines in the kernel (the sprite data) to use half the height and comment out the lines you mentioned. Thanks!

Edited by wallaby
  • Like 1

Share this post


Link to post
Share on other sites

Bb team, as I am still learning are there any screen shots or video to make the title screen and other items of interest. Sorry to ask, but I'm a visual person or will need help pointing me in the right direction. I will try but a a certain point people will give up like I did until this topic came about again. Hopefully I'm not asking too much, thanks.

Edited by Lewis2907

Share this post


Link to post
Share on other sites

The title kernel is syncing at 241 scanlines.

 

When I switch from the displaying the title screen, to the normal game routine, the game syncs at 242 (normal for DPC+, I think?) The change from 241 to 242 causes the screen to roll for a moment at the switch. Is there anything I can change to make the title kernel sync at 242 also? This will also help with PAL compatibility as it can't properly display an image with an odd number of scanlines.

Share this post


Link to post
Share on other sites

The title kernel is syncing at 241 scanlines.

 

When I switch from the displaying the title screen, to the normal game routine, the game syncs at 242 (normal for DPC+, I think?) The change from 241 to 242 causes the screen to roll for a moment at the switch. Is there anything I can change to make the title kernel sync at 242 also? This will also help with PAL compatibility as it can't properly display an image with an odd number of scanlines.

 

 

normal is 262.

Share this post


Link to post
Share on other sites

The Title Screen Kernel should run at a solid 262. IIRC if you used older versions of the data/asm files with DPC+ (versions that predate DPC+ support) it would cause scanline issues.

 

If that doesn't ring any bells, please zip up your project dir, and either post here or PM me.

Share this post


Link to post
Share on other sites

 

 

The Title Screen Kernel should run at a solid 262.

 

Sorry, I meant 261 for the title screen and 262 for my game loop.

 

Even stripping all my game code except the title screen loop still has it synced to 261.

 

A completely blank project using unaltered titlescreen asm files syncs at 261 according to Stella.

 

Here is the code I'm using (and using the download from the first post in this thread version 1.5)

 

Pardon my comments. They're so I can easily see where a bank is on Sublime Text's preview pane. I stripped all my code except what is used to run the title screen.

 set kernel DPC+
 set tv ntsc
 set smartbranching on
 set dpcspritemax 8

 goto __Bank_2 bank2

 bank 2

 temp1=temp1


__Bank_2
 
__Reset

titlepage

 gosub titledrawscreen bank6
 goto titlepage

GameStart


;BANK 3 *****************************************************************************************************************************************************

   bank 3
   temp1=temp1


; BANK 4 *************************************************************************************************************************************************
   bank 4
   temp1=temp1


;555 BANK5 55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
 
   bank 5
   temp1=temp1


;6666 BANK 6 6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666

   bank 6
   temp1=temp1

   asm
    include "titlescreen/asm/titlescreen.asm"
end
Edited by wallaby

Share this post


Link to post
Share on other sites

Sorry, I meant 261 for the title screen and 262 for my game loop.

Ah, that makes more sense. More or less it's a rounding error between 76 cycle line length and the 64 cycle timer that's used to measure the screen. I'll fix it when I get a chance.

Share this post


Link to post
Share on other sites

Wallaby,

 

If you have time please put together some tips and lessons learned. I will have more time in a week or so to learn the title screen. The question I have is how many title screens can you have in a game, meaning can I use them in fame play mechanics. Thanks again for the Bb forum and all I have leaned so far.

Share this post


Link to post
Share on other sites

You can only have one title screen, but you can animate the graphics. The only drawback to the title screen is how much ROM space it needs. You can easily fill a 4k bank. If you've budgeted that space in (I didn't, hah) then you're good to go. As for instructions - the title screen download in the first message in this thread has instructions in the .pdf. They're written well and easy to follow. Good luck!

Share this post


Link to post
Share on other sites

Ah, that makes more sense. More or less it's a rounding error between 76 cycle line length and the 64 cycle timer that's used to measure the screen. I'll fix it when I get a chance.

I've added v1.6 of the Titlescreen Kernel to the first post, which should address the issue above.

 

Enjoy!

Share this post


Link to post
Share on other sites

You can only have one title screen, but you can animate the graphics. The only drawback to the title screen is how much ROM space it needs. You can easily fill a 4k bank. If you've budgeted that space in (I didn't, hah) then you're good to go. As for instructions - the title screen download in the first message in this thread has instructions in the .pdf. They're written well and easy to follow. Good luck!

 

A sneaky way to get around this is to use RevEngs awesome multi kernel framework. Each 4k is technically it's own game with its own title screen. I do not know if this has or needs any later fixes RevEng has done to bB.

http://atariage.com/forums/topic/221100-bb-256k-128k-64k-32k-multikernel-frameworks/

Share this post


Link to post
Share on other sites

Wondering if you guys could assist. I've been using the Visual bB title wizard to try to design a title. I'm assuming the .BAS that gets generated is a compilable piece of code off the bat, yes? If so, it will not compile correctly for me. I'm not so sure how to remedy this. Pointers would be great!

Share this post


Link to post
Share on other sites

Hello all,

 

I'm trying to find a workaround to being able to display more than one title screen. I've read through this thread and some others, and haven't quite gotten there. My thought is to use if statements within titlescreen_layout.asm in order to control which drawing kernels are displayed. Here's what I've got:

 ; To use a minikernel, just list it below. They'll be drawn on the screen in
 ; in the order they were listed.
 ;
 ; If a minikernel isn't listed, it won't be compiled into your program, and
 ; it won't use any rom space.

 include "titlescreen/title_switch.asm"

 MAC titlescreenlayout
	if titleswitch = 0
       	draw_96x2_1
        draw_48x1_1
        endif
        if titleswitch = 1
	draw_48x1_2
        endif
        if titleswitch = 2
	draw_96x2_2
        draw_gameselect
        endif
 	
 ENDM


 ; minikernel choices are:
 ; 
 ; draw_48x1_1, draw_48x1_2, draw_48x1_3 
 ; 	The first, second, and third 48-wide single-line bitmap minikernels
 ;
 ; draw_48x2_1, draw_48x2_2, draw_48x2_3 
 ; 	The first, second, and third 48-wide double-line bitmap minikernels
 ;
 ; draw_96x2_1, draw_96x2_2, draw_96x2_3 
 ; 	The first, second, and third 96-wide double-line bitmap minikernels
 ;
 ; draw_gameselect
 ; 	The game selection display minikernel
 ;
 ; draw_score

My problem is passing the titleswitch variable to this .asm. I don't understand ASM very well, so I created titleswitch.asm to define a variable I could access through bB. The code is directly stolen from titlescreen_color.asm.

 ifnconst titleswitch
titleswitch
 endif
 .byte 0

So, this code works as intended if I directly type:

dim titleswitch = 0

into bB (or = 1, or = 2, as the layout code indicates). But of course, you can't change a dim statement, and I couldn't get def to work. However, as soon as I try to assign titleswitch to a letter variable in bB and then use titleswitch = 0 (or = 1, or = 2), I get nothing on my titlescreen.

 

I feel like I'm really close to getting this, but as I said, I don't understand ASM very well. I'd really appreciate any help.

 

Thanks!

Share this post


Link to post
Share on other sites

I'm trying to find a workaround to being able to display more than one title screen. I've read through this thread and some others, and haven't quite gotten there. My thought is to use if statements within titlescreen_layout.asm in order to control which drawing kernels are displayed. Here's what I've got:[...]

Try this out...

 

        lda titleswitch
        ;cmp #0 ; not required
        beq switch0
        jmp checkswitch1
switch0
                draw_96x2_1
                draw_48x1_1
        lda titleswitch
checkswitch1
        cmp #1
        beq switch1
        jmp checkswitch2
switch1
                draw_48x1_2
        lda titleswitch
checkswitch2
        cmp #2
        beq switch2
        jmp checkswitchdone
switch2
                draw_96x2_2
                draw_gameselect
checkswitchdone

  • Like 1

Share this post


Link to post
Share on other sites

Yes, that works, thank you so much! Today I was writing asm that looked similar to that, but I couldn't quite get there. It now makes complete sense.

 

With some finagling, I've got four separate "title" screens (one actual title screen, a between-level screen, a game-over screen, and a "you win!" screen, each unique and with at least a bit of graphical interest) crammed into the bank with about one hundred bytes free.

  • Like 1

Share this post


Link to post
Share on other sites

Could this be easily integrated into an official update to the titlescreen kernel? I could see Wizardry type games if multiple titlescreens could be used in one game. Hmmmn!

Share this post


Link to post
Share on other sites

You need to customize the titlescreen_layout.asm file, which you need to do to change the kernel layouts anyway, so by definition it's custom. I might throw an example into that file at some point, but it would be commented out.

 

If you mean integrated automatically via vbb, then that's up to Jeff.

 

Of course, the entire titlescreen data needs to fit within one bank, so you have a 4k limitation for all of the title screen data. That's why bjbest60 had to work hard to cram 4 screens in.

 

BTW, the title screen in The Byte Before Christmas uses this kind of conditional titlescreen_layout.asm, to allow the snowflake to fall down and turn on the various bitmaps as it passes by them. EMR II uses one too - it has a scrolling text bitmap that later transitions to a level selection wizard.

  • Like 1

Share this post


Link to post
Share on other sites

You need to customize the titlescreen_layout.asm file, which you need to do to change the kernel layouts anyway, so by definition it's custom. I might throw an example into that file at some point, but it would be commented out.

 

If you mean integrated automatically via vbb, then that's up to Jeff.

 

Of course, the entire titlescreen data needs to fit within one bank, so you have a 4k limitation for all of the title screen data. That's why bjbest60 had to work hard to cram 4 screens in.

 

BTW, the title screen in The Byte Before Christmas uses this kind of conditional titlescreen_layout.asm, to allow the snowflake to fall down and turn on the various bitmaps as it passes by them. EMR II uses one too - it has a scrolling text bitmap that later transitions to a level selection wizard.

 

Sounds like using the multi kernel framework might be the best solution for those using standard bB tools. When you need a different 3D wall for 2600 Wizardry just switch which 4k "game" you're in.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...