Jump to content
Sign in to follow this  
Nop90

Garbage on screen booting rom - need help for fixing it

Recommended Posts

Compiling some code with cc65 always creates a rom that on boot (on emulators and on real HW) shows some garbage on the screen.

 

This should be caused by the boot loader.

 

I'm going to publish Xump on phisical carts for the end of the year, but the publisher is asking me to fix this small problem and make the rom behave like commercial roms (i.e. have a clean dark screen before the splash screen).

 

This should involve modifying the bootloader (i think setting all the palette to black as first thing).

 

With patience and hard work I should be able to do it myself, but since in this period of the year I don't have so much time, I need to ask other developers an help.

 

Do someone already handled this small problem and has a modified version of the bootloader?

 

If not, someone could help me making this mod?

Share this post


Link to post
Share on other sites

We have a thread where I posted my own loader and we discuss things. It sets all colors to black right from the start.

Share this post


Link to post
Share on other sites

Here you go. The new cc65 loader ;) 

newbootldr.s

 

You just compile this asm file with your code and please remove the line below from your cart/lynx.cfg file.

-    __BOOTLDR__: type = import;

PS:

add the command tgi_clear() just after you run tgi_init()
 

  • Thanks 1

Share this post


Link to post
Share on other sites

I just pushed this bootloader to my cc65 repo. So it will become standard behaviour for my games as well. Thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Thank you very much. This is really a great community.

 

58 minutes ago, karri said:

add the command tgi_clear() just after you run tgi_init()

I already do this, thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Works great, but the compiler needs the extzp.inc file, that i copied in the same folder of the new loader to compile the rom.

 

That file should not be already available in a cc65 included folder? 

Share this post


Link to post
Share on other sites

You are correct. This file contains the global shadow registers and stuff related to the cart filesystem.

    .global      __iodat: zp
    .global      __iodir: zp
    .global      __viddma: zp
    .global      __sprsys: zp
    .global      _abc_score_ptr0: zp
    .global      _abc_score_ptr1: zp
    .global      _abc_score_ptr2: zp
    .global      _abc_score_ptr3: zp
    .global      _FileEntry: zp
    .global      _FileStartBlock: zp
    .global      _FileBlockOffset: zp
    .global      _FileExecFlag: zp
    .global      _FileDestAddr: zp
    .global      _FileFileLen: zp
    .global      _FileCurrBlock: zp
    .global      _FileBlockByte: zp
    .global      _FileDestPtr: zp

Hmm. For some reason my ABCmusic believes that it is warranted to have four score pointers in zp RAM. As all the libraries and the encrypted boot loader relies on these locations to be in fixed positions I won't remove the abc stuff. Perhaps these locations could be used for other sound engines if ABCmusic is not in use.

Share this post


Link to post
Share on other sites
On 11/5/2019 at 1:45 PM, karri said:

Yes it should. I will make a mental note of it to my "things to do" list.

1 year later...  🙂

Share this post


Link to post
Share on other sites
1 hour ago, 8bit-Dude said:

1 year later...  🙂

Actually the cause was somewhere else. Blacking out the palette was not the solution. I had to change the way I initialize the TGI.

Share this post


Link to post
Share on other sites
3 hours ago, karri said:

Actually the cause was somewhere else. Blacking out the palette was not the solution. I had to change the way I initialize the TGI.

Did you commit the changes to the official CC65 head? (The head version I am using still has the Green garbage screen, which I can get rid of by using newbootldr.s)

Share this post


Link to post
Share on other sites
5 minutes ago, 8bit-Dude said:

Did you commit the changes to the official CC65 head? (The head version I am using still has the Green garbage screen, which I can get rid of by using newbootldr.s)

Most of my changes are no longer compatible with the official cc65 head. So I have not had the energy to commit my stuff there in fear of breaking things.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...