Jump to content
IGNORED

GoSub (WIP)


Recommended Posts

 

On 9/23/2019 at 4:28 AM, atari2600land said:

I have some rather depressing news. Due to the amount of space reserved for graphics, all I have room for is a 36x36 pixel picture. So I played with the code and got a picture of a huge treasure chest in. Perhaps TIX can make it better than what I have now?

 

endingscene3.png

 

Also, I only have room for 20 levels, not the 30 I was hoping for.

..bummer

 

In my opinion the chest is more appropriate for a win screen !

I have squeezed my sinking sub into 36x36 stamp size.. I think it looks pretty good considering !

 

image.png.0108018a510a1c77edcb76ee7caeb360.png

Link to comment
Share on other sites

On 9/23/2019 at 2:28 AM, atari2600land said:

Due to the amount of space reserved for graphics, all I have room for is a 36x36 pixel picture.

To be honest I'd be very surprised if you had completely filled 4 graphics blocks. Remember that (assuming you're using a 16 line zone size) you can cut down graphics into 4*16 blocks, and if you've got a large graphic with lots of empty space then you can always split it into different parts.

Link to comment
Share on other sites

13 hours ago, SmittyB said:

To be honest I'd be very surprised if you had completely filled 4 graphics blocks. Remember that (assuming you're using a 16 line zone size) you can cut down graphics into 4*16 blocks, and if you've got a large graphic with lots of empty space then you can always split it into different parts.

If I put two 64x64 pictures in, it says I have -3000 bytes left. I'm using an 8 line zone size, but I don't see how that makes a difference.

gosubgameoverscreen.png

Link to comment
Share on other sites

Everything the 7800 draws is 1 zone tall (anything taller is actually drawn as separate pieces) so the smallest unit of graphics data you can have is 1 byte by 1 zone, or in your case 4 by 8 pixels.

As everything is a zone tall, anything not a multiple of the zone size gets padded with zeroes so a 36*36 image is actually stored as a 36*40 image (9*5 of those small 4*8 units). If you had a 16 line zone size then it would be stored as a 36*48 image.

 

If you were to take all of your graphics and cut them up into 8 line tall strips I imagine you would find that a lot of it is wasted space. What I meant to say before is that by identifying where that empty space is you can break up the graphics you import to make better use of ROM. It would mean that rather than say a single call to plotbanner you might have to make a few calls to plotsprite but it would be a way to squeeze in more graphics.

  • Like 2
Link to comment
Share on other sites

2 hours ago, atari2600land said:

Then why does it keep telling me I don't have enough room?

 

 

If your using 160B for your image I've found those images take up a huge amount of space. The ship on the intro in Arkanoid takes up 2.5 gfx blocks (of 3 in banks) just for that. From memory it's around 96x96 pixels (split into a left and right side).  I'm going to have to do what SmittyB suggested to fit in some of the additional animations. 

Link to comment
Share on other sites

3 hours ago, atari2600land said:

I was able to bump up the image size to 36x48 in case that helps. I still only have room for just 20 levels, though I don't see why. Most of the program is in dmahole 0 for some reason.

 

gameoverscreen3.png

Have you added a dmahole 1 further down? you might be able to fit in more code.  The compilation output should tell you if there is more space.  For example:

 

             339 bytes of ROM space left in DMA hole 0.
             1485 bytes of ROM space left in DMA hole 1.
             2048 bytes of ROM space left in DMA hole 2.

 

Link to comment
Share on other sites

5 hours ago, atari2600land said:

I was able to bump up the image size to 36x48 in case that helps. I still only have room for just 20 levels, though I don't see why. Most of the program is in dmahole 0 for some reason.

 

It's no use drawing and redrawing the images in different resolutions and colors,

so I wait the final specs to finalize them !

Link to comment
Share on other sites

Yes, I added a DMA Hole 1.


7800basic compilation complete.
User-defined 7800.asm found in current directory
   931 bytes of ROM space left in the main area.
     101 bytes of ROM used by the song 'itwontplay'
     46 bytes of ROM used by the song 'youaredead'
             352 bytes of ROM space left in DMA hole 0.
             984 bytes of ROM space left in DMA hole 1.
     $1880 to $1fff used as zone memory, allowing 15 display objects per zone.
     1548 bytes left in the 7800basic reserved area.

  • Like 1
Link to comment
Share on other sites

OK, here's the deal. The game will have 25 levels. I tinkered with the code a lot today. I don't have any room for more than 25 levels, but I do have room for an ending screen song, a boss song, and perhaps a bonus game song. I only have 105 bytes left in the main area, so I'll have to put the song data in DMAHOLE 0 where the most data free is. There's not much room in 32k for what I had originally planned, but it's close to what I wanted.

gosub20190928.zip

  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...