Jump to content

Photo

The Titlescreen Kernel


239 replies to this topic

#201 Lillapojkenpćön OFFLINE  

Lillapojkenpćön

    Space Invader

  • 35 posts

Posted Tue Jan 24, 2017 1:33 AM

1.6 looks great, rock steady.

When I go from the titlescreen to the game the score jumps one pixel to the left, same in 1.5. I've modified both score fonts the same way, six pixel wide numbers with one row of nothing on each side, how do i fix it?


Edited by Lillapojkenpćön, Tue Jan 24, 2017 1:33 AM.


#202 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Wed Jan 25, 2017 9:41 AM

If I recall correctly, I designed the title-screen score minikernel to be dead-center, so it would align nicely with the other graphics.

The bB standard kernel displays the kernel off-center. (this to give it some extra cycles where it needs it, which allows it to display playfield bars on either side of the score.) This is where the alignment shift is coming from. It shouldn't be an issue with the standard kernel.

The title-screen score minikernel would needs some surgery to reposition the score off-center, to match the standard kernel. When I get a chance, I'll see if I can add this as an option.

#203 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Sun May 14, 2017 9:43 AM

I've given the titlescreen kernel a try for the first time, and I've been successful at displaying a bitmap with the 48x2 kernel. However, it has a background color that is dark, but isn't completely black like the rest of the screen. Is there any way to make the background pure black?

 

Screenshot_20170514_072555.png



#204 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Sun May 14, 2017 3:36 PM

I've given the titlescreen kernel a try for the first time, and I've been successful at displaying a bitmap with the 48x2 kernel. However, it has a background color that is dark, but isn't completely black like the rest of the screen. Is there any way to make the background pure black?


The overall color can be set in titlescreen/titlescreen_color.asm, but it defaults to black.

Maybe you're comparing the black background to the blanking color? Blanking is darker than the blackest black an NTSC 2600 can produce.

#205 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Sun May 14, 2017 5:24 PM

That may well be it.  In that case, is there a way to set the rest of the screen to the same color so that the images don't appear is obvious rectangles?  It seems like I must be missing something obvious, since the screenshots I see don't show this color contrast at all.

 

Another question - does anyone have a command line utility that works like the ImgToCode Windows app?  If not, would anyone be interested in one?  I was thinking about writing a simple one for my own convenience that could work on Mac/Linux, and I would be happy to share the results if anyone would find it useful as well.



#206 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Sun May 14, 2017 6:24 PM

The overall screen color can be set in titlescreen/titlescreen_color.asm. Of if you prefer something dynamic, you can dim a "titlescreencolor" variable, and set it to the color you want.

I'm not actually seeing any contrast between blacks in your screenshot. On both my computer and phone, it appears all to be uniformly black.

I think a cross-platform command-line utility like ImgToCode would be great!

#207 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Sun May 14, 2017 7:36 PM

I can see it clearly in two emulators, but maybe I should try it on real hardware before deciding if it's a real issue.  I suppose I can make a taller bitmap that fills all of the vertical space as a workaround if so, so that it appears to be more uniform.



#208 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Mon May 15, 2017 6:45 AM

After more experimenting, it looks like the problem must be with my bitmap specifically.  When I replaced my 48x2 with the "Yoshi" one from example 4, I didn't get the weird color as image background.  When I did the reverse substituting my bitmap for the Yoshi one in example 4, I did still get the weird background color for my bitmap, but not for any of the others.  I visually exaimed by converted bitmap and compared it visually to the working Yoshi one, but I couldn't find any problems.  Any thoughts?

 

Mind you, this isn't vitally important, since I could always start from scratch with a new image if need be, since this one is more of a placeholder, but the mystery of it is bugging me.  Attached is the compiled example 4 with my image substituted for the Yoshi one, and the problematic converted image itself.

 

Attached File  ex4-color_by_flicker.bas.bin   16KB   13 downloads

 

Attached File  48x2_1_image.asm   3.66KB   11 downloads



#209 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Tue May 16, 2017 12:18 PM

Well, I never figured out the cause of my issue, but I don't much care since I have something that looks much nicer now that I've started fresh.  I love this kernel! :)  This screenshot doesn't do it justice, since I think it only captures one frame of the flicker?

 

 

Screenshot_20170516-141333.jpg

 

 



#210 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Sun Jun 25, 2017 6:38 PM

Is it at all possible to combine the titlescreen with a starfield effect?  If so, what objects (if any) are not used by the titlescreen kernel to use for this?  I made a stab at it with the ball, but it didn't show up when I tried it.  Or is it not possible to have an effect that covers the whole screen like that while the titlescreen kernel is active?

 

I'll confess that I don't understand that wizardry and black magic that the titlescreen kernel uses, so it's hard for me to make an educated guess on this one.  :-)



#211 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Sun Jun 25, 2017 7:18 PM

Each of the minikernels in the titlescreen kernel hit HMOVE at some point. This resets the effect, so a clean full-screen starfield effect wouldn't be possible.

For the horizontal strip that any particular minikernel would occupy, it's possible that the effect could be added into the assembly code, but it would take a fair bit of surgery.

#212 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Mon Jun 26, 2017 7:48 AM

It sounds like it would be more trouble than it would be worth, since for an individual titlescreen minikernel, I could draw my own stars with a bitmap that would look much better, anyway.  I suspected that having a screen-wide effect wouldn't be possible, but I just wanted to make sure.  :-)



#213 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 8,829 posts

Posted Mon Jun 26, 2017 7:51 AM

You'd have to incorporate the starfield effect into whatever titlescreen mini kernel you're using at the time otherwise you'd be flickering between them.  This would mean having enough assembly savvy to not only integrate two disparate graphic kernels but make sure there's enough time for both of them.



#214 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Mon Jun 26, 2017 9:25 AM

I think the fact it would be limited to each horizontal strip, and also limited to full screen width, limits the visual usefulness. It also would likely require more memory (IIRC I'm already using the object x and y coordinates, though I may be wrong)

Agreed its probably not worth the effort.

#215 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Mon Jul 24, 2017 7:26 PM

Hey, where do I find that image converter described in the PDF? I tried the one in my VbB install and it doesn't have the same options, am I using an older version of VbB, or is there somewhere I have to download it?

Also, can I use this with a game running, as I wish to use it to put air hockey table graphics in my game.

 

Here's the image I plan on using, is there also a way to cut it down to a quarter and mirror it horizontally and vertically?

Attached Thumbnails

  • divider.png

Edited by 8-bit_d-boy, Mon Jul 24, 2017 10:25 PM.


#216 RevEng OFFLINE  

RevEng

    River Patroller

  • Topic Starter
  • 4,674 posts
  • Bitnik
  • Location:Canada

Posted Tue Jul 25, 2017 6:14 AM

I'm not sure if it's the one in the docs, but here's the last version of vbb I'm aware of.

You can't mirror titlescreen data in either direction.

#217 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Tue Jul 25, 2017 10:56 AM

Alrighty, I figured out how to get the data in there anyway without the options in the PDF, but I keep getting the error:

 

titlescreen/96x2_1_image.asm (124): error: Unknown Mnemonic '%00000000'.
 
Unrecoverable error(s) in pass, aborting assembly!
Complete.
Errors were encountered during assembly.
 
Is this code correct? 
 
gosub titledrawscreen bank2	

drawscreen



	bank 2
	asm
	include "titlescreen/asm/titlescreen.asm"
end


#218 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Tue Jul 25, 2017 11:17 AM

Without looking at the titlescreen/96x2_1_image.asm file, my first guess is that your image data isn't indented, so it is trying to parse that line as a label.



#219 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Tue Jul 25, 2017 12:41 PM

Turns out, yes the first line of image data was not indented, so I indented it and got a new error message:

 

 

--- Unresolved Symbol List
fontcharARISIDE          0000 ????         (R )
_NUSIZ1                  0000 ????         (R )
fontcharHEART            0000 ????         (R )
fontcharMRHAPPY          0000 ????         (R )
fontcharBLOCK            0000 ????         (R )
player9height            0000 ????         (R )
fontcharUNDERLINE        0000 ????         (R )
mk_96x2_8_on             0000 ????         (R )
mk_48x2_X_on             0000 ????         (R )
mk_48x2_8_on             0000 ????         (R )
mk_48x1_8_on             0000 ????         (R )
bmp_96x2_1_index         0000 ????         (R )
fontcharCOPYRIGHT        0000 ????         (R )
score_kernel_fade        0000 ????         (R )
bmp_96x2_1_fade          0000 ????         (R )
fontcharCOLON            0000 ????         (R )
fontcharDOLLAR           0000 ????         (R )
mk_player_on             0000 ????         (R )
fontcharARIFACE          0000 ????         (R )
fontcharMRSAD            0000 ????         (R )
mk_gameselect_on         0000 ????         (R )
mk_96x2_4_on             0000 ????         (R )
mk_48x2_4_on             0000 ????         (R )
mk_48x1_4_on             0000 ????         (R )
fontcharSPADE            0000 ????         (R )
fontcharSPACE            0000 ????         (R )
mk_96x2_5_on             0000 ????         (R )
mk_48x2_5_on             0000 ????         (R )
mk_48x1_5_on             0000 ????         (R )
mk_96x2_6_on             0000 ????         (R )
mk_48x2_6_on             0000 ????         (R )
mk_48x1_6_on             0000 ????         (R )
0.title_vblank           0000 ????         (R )
mk_96x2_7_on             0000 ????         (R )
mk_48x2_7_on             0000 ????         (R )
mk_48x1_7_on             0000 ????         (R )
fontcharCLUB             0000 ????         (R )
FASTFETCH                0000 ????         (R )
mk_48x2_1_on             0000 ????         (R )
mk_48x1_1_on             0000 ????         (R )
mk_96x2_2_on             0000 ????         (R )
mk_48x2_2_on             0000 ????         (R )
mk_48x1_2_on             0000 ????         (R )
fontcharFUJI             0000 ????         (R )
fontcharDIAMOND          0000 ????         (R )
BS_jsr                   0000 ????         (R )
mk_96x2_3_on             0000 ????         (R )
mk_48x2_3_on             0000 ????         (R )
mk_48x1_3_on             0000 ????         (R )
fontcharPOUND            0000 ????         (R )
 
      9556 bytes of ROM space left in bank 1
      0 bytes of ROM space left
 
 
Fatal assembly error: Source is not resolvable.
Errors were encountered during assembly.
 
Oh boy.

Edited by 8-bit_d-boy, Tue Jul 25, 2017 12:41 PM.


#220 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Tue Jul 25, 2017 12:50 PM

It's difficult to tell without seeing your source, so this is just a shot in the dark, but that is the same unresolved symbol list I get when I have an undefined variable or label with the exception of the "BS" line.  I don't suppose you have an undefined label or variable named "BS" anywhere in your code?



#221 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Tue Jul 25, 2017 1:14 PM

Which code(s) should I post?

 

I'll attach the airhockey.bas and the minikernel one.

 

Also I think BS means "Bank Switch", as I don't have a variable named that.

Attached Files


Edited by 8-bit_d-boy, Tue Jul 25, 2017 1:15 PM.


#222 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Tue Jul 25, 2017 1:51 PM

I'm not sure what the issue is - I know that it's stumbling on this line

   gosub titledrawscreen bank2	

...but I don't know what the issue is with that line.

 

It looks like you are using the titlescreen kernel incorrectly, however - you have it in your main loop right before a drawscreen.  It needs to be in its own loop without a drawscreen command, with the gosub titledrawscreen inside of that loop.  You can't mix the titlescreen kernel with normal bB display code. 



#223 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Tue Jul 25, 2017 2:29 PM

Ohhhhh. I was hoping to use it to display a typical air hockey playfield graphic. Guess not. 

I was also hoping to use it to display "Air Hockey" in the space at the top of the screen.



#224 kdgarris ONLINE  

kdgarris

    Chopper Commander

  • 162 posts

Posted Tue Jul 25, 2017 3:42 PM

Not possible, unfortunately - but it can be used for an awesome title screen. :)

#225 8-bit_d-boy OFFLINE  

8-bit_d-boy

    Star Raider

  • 53 posts

Posted Tue Jul 25, 2017 4:21 PM

Perhaps I'll make something with more perspective for the title screen, like standing at an air hockey table.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users