Jump to content
IGNORED

Intellivision Celery


Recommended Posts

10 minutes worth of music?!

 

Very cool. What kind of ASM ORG did you have to do to fit that all in?

 

 

 

While I've also asked for a simple way to repeat blocks of music (and then still be able to go into other blocks), worrying about storage space for music is a bit of a non-issue. I've got a game with over 10 minutes' worth of MUSIC statements - down to sixteenth notes - and it's an insignificant amount of code. You'd have to either be in the habit of writing half-hour long songs, or have an incredibly code-dense game before storage space is a concern here.

 

It'd be mostly useful if you're modifying/fixing a few repeated bars - sometimes I forget to fix up EVERY one of the repeated sections.

Link to comment
Share on other sites

10 minutes worth of music?!

 

Very cool. What kind of ASM ORG did you have to do to fit that all in?

 

 

Lots :) There are 5 reasonably safe ORG spots you can use (there are other threads outlining this). Honestly the music isn't even that much storage. MUSIC statements are only 2 words each. I've got a 3 minute song that is just under 2000 words. You have close to 42,000 words available on a modern Inty cart - so you could in theory have a full hour of music on a single cart. If I had a better converter tool, I've thought about putting an actual complete CD on a cart.

 

You could easily use 20 minutes of music and still have a graphically rich, complex game.

Link to comment
Share on other sites

I am brewing up something myself and there will be 10+ minutes of music, so I was wondering what kind of tricks you were using, since I have not assembled everything into a single ROM yet. I think bank switching on JLP might be in order actually...

 

 

Lots :) There are 5 reasonably safe ORG spots you can use (there are other threads outlining this). Honestly the music isn't even that much storage. MUSIC statements are only 2 words each. I've got a 3 minute song that is just under 2000 words. You have close to 42,000 words available on a modern Inty cart - so you could in theory have a full hour of music on a single cart. If I had a better converter tool, I've thought about putting an actual complete CD on a cart.

 

You could easily use 20 minutes of music and still have a graphically rich, complex game.

Link to comment
Share on other sites

Is that a 3 minute song at tempo 9 if it uses up 2000 words of MUSIC statements? I'm trying to sync this info with what me and First Spear discussed in the parallel thread about music tempos.

 

I suppose a 10 minute song at tempo 5 would use 12000 words of data. Double that, and you have spent more than half the maximum capacity for a 20 minute long song at a reasonably fast tempo.

Link to comment
Share on other sites

I am brewing up something myself and there will be 10+ minutes of music, so I was wondering what kind of tricks you were using, since I have not assembled everything into a single ROM yet. I think bank switching on JLP might be in order actually...

 

 

There's no need for bank switching, or hardware-specific schemes.

 

ASM ORG $C100 gives you a nearly 16,000 word chunk of contiguous ROM space to play with. Simply place that line at the end of your code, and then all MUSIC statements after it. Voila! Tons of space for music.

Link to comment
Share on other sites

I've added level 10. A new enemy: Mean Peas. They are peas, but they're mean, bigger, faster and have an appetite for celery.

 

 

Wow! That's hard! LOL! It took me a few tries before I got their pattern and avoided their mean nasty jaws! :lol:

 

I like this level, but I agree with timdu that they do not look like mean peas. I suggest to simplify their faces. Just make them a round ball with two eyes. If you make them double-vertical-resolution, you can get a smoother "round" detail. For example, here's the pattern I used for the "Snowball" sprite in Christmas Carol:

:0      
........
........
........
..###...
.#####..
.#####..
##.#.##.
##.#.##.
#######.
#######.
.#####..
.#####..
..###...
........
........
........

I guess you could make them look "meaner" by giving them slanted eyes:

:0      
........
........
........
..###...
.#####..
.#####..
#.###.#.
##.#.##.
##.#.##.
#######.
.#####..
.#####..
..###...
........
........
........

A couple of things you could try to make the level a bit more interesting (and challenging) are:

  • Instead of having the mean peas run around in a pattern constantly, keep a counter of how many tiles they have moved and when a certain number is reached, have them stop briefly and change direction. Then reset the counter and start again.
  • You could change the tile counter maximum on each level to make them less predictable.
  • For maximum unpredictability, select the counter maximum randomly after each stop and reset.

 

In any case, it is your game so you should make it as you wish. These are only suggestions, and you are free to take them or ignore them at your pleasure. :)

 

-dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

That has been my constant battle. It's "fun", and why I do this at all.... Anyway, if I convert a song with half notes, quarter, eighth, 16th, 32nd, 64th, then a 64th note is the smallest and has to represent one MUSIC row but just one half note takes 32 rows. Each row takes a number of words no matter what. If the tempo is in the 3-4 range, that means a song will blow through a lot of ROM to play.

 

Is that a 3 minute song at tempo 9 if it uses up 2000 words of MUSIC statements? I'm trying to sync this info with what me and First Spear discussed in the parallel thread about music tempos.

 

I suppose a 10 minute song at tempo 5 would use 12000 words of data. Double that, and you have spent more than half the maximum capacity for a 20 minute long song at a reasonably fast tempo.

Link to comment
Share on other sites

I suppose a 10 minute song at tempo 5 would use 12000 words of data. Double that, and you have spent more than half the maximum capacity for a 20 minute long song at a reasonably fast tempo.

 

Just need to point out the incredible fact that we can fit 20 minutes of non-repeating music into an Intellivision game - and still have nearly 40KB left over. That's... mind-blowing. You can fit one hell of a game in 40KB. And you still have more music than has ever existed before in this generation of consoles.

Link to comment
Share on other sites

So I guess the music thing points out that I have a ton of room for level data? I hope so. My ultimate dream would be 99 levels, but I doubt that's realistic. Or perhaps it is? I don't know.

Anyway, I worked on the mean pea level. I redesigned the level and made the mean peas' movement random. I also threw in what to do in case they overlap, because that kept happening and I didn't want it to. But then their movements were in sync, so I threw in something so they never move the same direction at the same time.

celeryintv20160923.rom

Link to comment
Share on other sites

This took a few hours to try and figure out. I made an 11th level. The game now is at 15.5k, so I'm going to use the space in $D000-$FFFF to store the rest of the data. I've done a test once before where I bankswitched level data and it works okay, but I don't know whether it will work now that I reached a 16k limit. I'm also wondering how many levels I'll be able to fit in the game. Some of the levels needed extra code in the main loop to make it work, so I guess as I keep adding levels, I'll just keep adding additional code in the game and move some level data to $D000 space.

celeryintv20160924.zip

Link to comment
Share on other sites

  • 3 months later...

I am back working on this. The game is at 16k. My computer says 17k, but when I go to click on it, it says 16.0k. So whatever. I made a 12th level. It's a level where you race against the mean pea following you. This took some time to do. Let me know if the enemy's speed is too fast.

I added/changed some stuff, like only having 1 speed, to start the game, press 1.

celeryintv20170123.rom

  • Like 2
Link to comment
Share on other sites

Added a thirteenth level. My ROM is now bigger than 16k, it's now 16.5k. To be sure, I tried it in my LTO Flash on a real INTV and it still works.

 

When you say that your "game is at 16K" and that your "computer says 17K," are you talking about the file size or the ROM space usage? The difference is that your computer reports file sizes in Kilobytes, which is a unit representing about one thousand bytes (actually 1,024 bytes); while the Intellivision ROM space is measured in Kilodecles or Kilowords -- each "Decle" being a 16-bit word. As you may know, a 16-bit word is composed of two 8-bit bytes.

 

In other words, the "K" in your computer's file system means 1,024 Bytes, while the "K" in Intellivision ROM nomenclature means 1,024 16-bit words or 2,048 bytes.

 

What all this means is that when your ROM file size is 16K (Kilobytes), the ROM consumed is actually 8K (Kilodecles), or exactly half of it. Therefore, you are nowhere near the limit of 16K (Kilodecles) of the default ROM segment of the Intellivision ROM.

 

-dZ.

Edited by DZ-Jay
  • Like 1
Link to comment
Share on other sites

So I deleted the "ASM ORG $D000" line and it didn't like that and while it compiled, all I got in jzintv was a blank screen. I put the line back in and it worked.

 

 

 

That's because the default segment is 8K not 16K (I'm sorry about adding to this confusion, I had forgotten the memory map). If your game is 16K you still need that ORG. Again, that's Kilo-decles, not bytes.

 

However, rather than go for $D000, which gives you only another 8K, why not go for a big segment, like $C040, which gives you 16K more on top of the 8K you already have. You can always add another ORG for $D000 to get another 8K if you need them (that would then be 8K + 16K + 8K = 32K, which is quite a bit!). Here's the typical 42K memory map we use in modern cartridges:

                ; --------------------------------------
                ; Memory map for 42K ROM cartridge
                ; --------------------------------------
                ;   SEGMENT     RANGE
                ;      0        $5000 - $6FFF :  8K
                ;      1        $A000 - $BFFF :  8K
                ;      2        $C040 - $FFFF : 16K
                ;      3        $2000 - $2FFF :  4K
                ;      4        $7100 - $7FFF :  4K
                ;      5        $4800 - $4FFF :  2K
                ;
                ;      CARTRAM  $8040 - $9EFF :  8K
                ; --------------------------------------

The IntyBASIC manual mentions the following safe ranges only, so you may want to follow them to maintain compatibility:

     $2000-$2FFF - 4K
     $5000-$6FFF - 8K
     $A000-$BFFF - 8K
     $C100-$FFFF - 16K 

Staying within those boundaries (something that nanochess has stated he would like to figure into IntyBASIC someday) ensures you do not conflict with any devices or peripherals of the Intellivision platform.

 

-dZ.

Edited by DZ-Jay
  • Like 1
Link to comment
Share on other sites

  • 5 years later...

Someone requested I work on this some more. I did. I got angry. My eye began hurting. So here.

What I did was rewrite the code so it's a lot better. It's more compact now. I had forgotten most of what I was doing. I had to start over again making levels since my new compact code wouldn't work with them. I'm up to level 5 now.

My eye hurts so much.

celeryintv20221129.rom

Link to comment
Share on other sites

So my eye ache left and I went back to work. I got angry again because the game was being a stupid jerk and not doing what I told it to. If I put celeryy=110 why wouldn't it place it off screen? My eye is beginning to hurt again. Seems like every time I work on the Intellivision it starts being stupid and hating me. But I FINALLY got things to work okay after a few hours. I made a few changes.

  • got rid of the repeating initial note when the game goes back to the title screen.
  • celery disappears off screen when he gets eaten.
  • big mean peas now roll.
  • changed title screen text a little.

Thankfully the Intellivision has one good thing going for it: 3 shades of green.

If you're wondering how to start the game, press "1" for five lives and a slow game or "2" for three lives and a faster game. The game should start automatically after pressing 1 or 2 on the title screen.

celeryintv20221130.rom

  • Thanks 2
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...