Jump to content

Photo

Number Blaster & Generic Shump Game


53 replies to this topic

#1 Kiwi OFFLINE  

Kiwi

    Stargunner

  • 1,353 posts

Posted Sat Feb 21, 2015 8:56 PM

I decided to share my games with the community.  These 2 games are not exactly done, but I would prefer give people a chance to play them.  I'm not sure how they are on the real Intellivision.  If the Intellivision explode while playing my games, I'm deeply sorry and might send bouquet of flowers to you via mail. 

Number Blaster, I originally programmed this game on the TI-83+ calculator.  So I recreate the same game from my memory and decide to put it on the Intellivision.  The 10 lines test inspired me to expand on the tile version of Meteor Blast'em, which Number Blaster came to be.  Number Blaster is pretty much shoot the number to equal the number that is next to it. The round finishes once all the numbers are equip.  

 

NumberBlaster2.gif.gif

 

Generic Shoot'em Up, improv on the spot.  This is the expand upon version of the sprite version of the 9 liner Meteor Blast'em.  I wanted to apply the similar thing I learned from developing Colecovision game to IntyBASIC.  This game seems very taxing for the Intellivision. I only used Nostagia emulator to test these game.  It a space shoot'em up game.  Get to the end, defeat a boss, and then you play a harder version of the same level.  The magic box contains 7 different effects.  I do want to program from scratch to make a similar game. 

 

Here's the gif of the boss fight.

 

ShumpWIP4.gif.gif

 

And here are the ROMs. Attached File  NBandGShump.zip   7.08KB   243 downloads



#2 pimpmaul69 OFFLINE  

pimpmaul69

    River Patroller

  • 4,821 posts
  • INTV Brotherhood Technician
  • Location:Colorado

Posted Sun Feb 22, 2015 12:09 AM

nm figured it out.

Attached Thumbnails

  • image.jpg
  • image.jpg

Edited by pimpmaul69, Sun Feb 22, 2015 12:27 AM.


#3 pimpmaul69 OFFLINE  

pimpmaul69

    River Patroller

  • 4,821 posts
  • INTV Brotherhood Technician
  • Location:Colorado

Posted Sun Feb 22, 2015 12:18 AM

nm

Edited by pimpmaul69, Sun Feb 22, 2015 12:27 AM.


#4 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Sun Feb 22, 2015 8:27 AM

nevermind.jpg



#5 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Sun Feb 22, 2015 8:37 AM

Kiwi -

 

Glad you finally made your own topic!

 

I tried these games. To tell the truth, math game wasn't very exciting for me - although it did have an interesting "look".

 

I guess "Frog Fractions" has spoiled me for all normal math games...  :)

 

The Shoot-em-Up Game is already pretty fun.

 

It looks cool, and I like the variety of weapons and bad guys.

 

shot0067.gif

 

Things I would most like to see:

 

1. Sound! (Most of the best Shoot-em-Ups have sound!)

2. Some visual indication that I am doing damage to the boss character. Currently it doesn't even flash when hit. (Since the scrolling is stopped, you could even put up a health bar...)

3. Some way for the player to regain some health...

4. A way to restart the game besides hitting reset...

 

So far so good!

 

Catsfolly


Edited by catsfolly, Sun Feb 22, 2015 8:38 AM.


#6 Kiwi OFFLINE  

Kiwi

    Stargunner

  • Topic Starter
  • 1,353 posts

Posted Sun Feb 22, 2015 9:19 AM

Yes, the math game was kinda boring.  I'm happy to let people try that game and see how it receive. 
 


Things I would most like to see:

 

1. Sound! (Most of the best Shoot-em-Ups have sound!)

2. Some visual indication that I am doing damage to the boss character. Currently it doesn't even flash when hit. (Since the scrolling is stopped, you could even put up a health bar...)

3. Some way for the player to regain some health...

4. A way to restart the game besides hitting reset...

 

So far so good!

 

Catsfolly

1. I will have to figure out how to work with sounds.  I have some ideas how to get sound working. I think sound, restore and read will be the key.
2. I will probably make a healthbar, or make the boss flash
3. The flashing magic box, the white and dark green restore your health. Dark Green also grant you 25 points.

4. cont1.B1 will reset the game.  I did it this way so if you're holding the B0, then it'll skip the score screen and immediately reset the game.  B1 bypass that issue. 

Thank you for playing.  In the next version. I moved the sprite 0-7 statementd right after the scroll function. So sprite no longer flick backward if the screen moves to fast, or there's many enemies on screen, slowing the game. 



#7 Kiwi OFFLINE  

Kiwi

    Stargunner

  • Topic Starter
  • 1,353 posts

Posted Sun Feb 22, 2015 10:29 PM

I added sounds to this game.

They are pretty much none data version of the sound.  I did take nanochess's sound from his music demo for the shooting. 

IF S=0 then SOUND 2,0,0'shut off sound
IF V=0 then SOUND 0,0,0'shut off sound
IF V2=0 then SOUND 0,0,0'shut off sound
IF V<>0 then SOUND 0,#weap,V:V=V-1 'shooting - 4 different tone sounds like NES version Toki shooting
IF V2<>0 then SOUND 0,350,V2:V2=V2-2 'tink, hit an enemy
if V4=0 then V4=0:SOUND 1,0,0'shut off sound
if V4<>0 then SOUND 1,700+W,V4:W=W+25:if W=150 then W=0:V4=V4-1 'destroy enemies
IF S=2 then SOUND 2,#S,V3:#S=#S+40: if #S>940 then V3=0:S=0'got hit,decending tone fast
IF S=1 then SOUND 2,#S,V3:#S=#S-20: if #S<140 then V3=0:S=0'shot powerup, upcending tone slow

I added a healthbar for the boss. Since boss's enemy ID is always 8. Whenever enemy with ID of 8 will make this bar appear.  And I added a moon backdrop after beating the first boss. The boss get faster and have more HP as every stage get beaten.   I did put skip this code if the enemy or shot ID isn't this number in some of the complicated code since if branch doesn't get taken still take cycle, so jumping over 4 or 5 branches seems to save some cycles.

Here's the boss fight, getting bosses or enemy flash is a bit complicated since sprites have their own individual colors, which will need 6 more bytes for their alternate colors.  So healthbar and bullet hit sound effect should aid the player enough.

 

Here's the gif of the boss fight in action and the new moon graphics.

 

ShumpWIP4.gif

And the game exceeded 8K word, and now approaching 16K word size.  The main loop is in the first 8KW, the procedure in the 4KW space, and the graphics in 4KW space. 

 

Here's the new ROM of the game in progress. Attached File  SSUv2.rom   17.06KB   166 downloads


Edited by Kiwi, Sun Feb 22, 2015 10:32 PM.


#8 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Sun Feb 22, 2015 11:10 PM

And the game exceeded 8K word, and now approaching 16K word size.  The main loop is in the first 8KW, the procedure in the 4KW space, and the graphics in 4KW space. 

 

If you push past 16K, add this "somewhere" in your code (you can check the assembler listings to see where you're going over):

 

ASM ORG $C100

 

I usually end up stuffing the graphics/sound/other data after this point as that's the bulk of the ROM size after a while.


Edited by freeweed, Sun Feb 22, 2015 11:11 PM.


#9 catsfolly OFFLINE  

catsfolly

    Dragonstomper

  • 704 posts
  • Location:Japan

Posted Tue Feb 24, 2015 2:11 AM

Kiwi -

 

I tried the new level for a bit.

My first impressions:

 

plus

It's great to have sound effects.

 

I like the moon background.

 

The sound and health bar help a lot when fighting the boss.

 

I like the score appearing after the boss is defeated.

 

I like the variety of weapons.

 

Somehow I got a weapon speedup attribute, that lasted even when I switched weapons.

 

minus

Sometimes the boss would walk off the bottom of the screen, and come back from the top of the screen as half a boss.

 

Some sound effects don't feel like "space game" effects to me.

 

After beating the boss with the moon background, the scrolling looked strange for a while. The old and new graphics didn't seem to tile correctly.

 

The magic box is (so far) hard for me to use strategically. Since it is often changing colors and takes several hits, I am never sure when I will destroy it and what I will get as a result. It is fun to see something different from the "pick up the attribute" approach, but it is frustrating when (for example) I like my weapon and really need new health, but I end up with a different weapon,,,

 

I want to move left and right, at least a little bit...

 

idea.

Would it be possible to have a generic "hit but not yet destroyed" color for the sprites? Maybe red would be good?

 

 

 

 

Catsfolly



#10 carlsson OFFLINE  

carlsson

    River Patroller

  • 4,380 posts
  • Location:Västerås, Sweden

Posted Tue Feb 24, 2015 3:47 AM

An idea for the magic box would be to implement it as bonuses in the MSX game Knightmare. For each time you shoot at a bonus box, it changes colour or content, can be a different weapon, eliminating all enemies on screen, freezing the scroll, making the player invincable for a while etc. The box never is destroyed, and it is up to you to shoot enough times to get the bonus you currently need.



#11 Kiwi OFFLINE  

Kiwi

    Stargunner

  • Topic Starter
  • 1,353 posts

Posted Tue Feb 24, 2015 12:34 PM

Here's the latest ROM Attached File  SSUv3.rom   19.06KB   164 downloads

I added more complicated sound.  I couldn't use a 2nd read per frame since the strip drawer use a read and restore a frame.  Sound works, but will cut out.  I couldn't use label as a pointer like for C program so I loaded the sound table to 16-bit array and then play back the sound from #sounddata.  Even if I DIM #sounddata(98), then there isn't a warning or error.  At least there 28 words if you use scroll and I'm using about 6 of them for misc data, and it safe to use 16 words for the array.  So I have about 6 words left.  So I shouldn't worry about that too much.  So sound channel 0 uses the data array.  Used for the shoot sounds and the enemy hit sound. Sound 1 still use for enemy death. Sound 2 is still use for dataless sound. I added one more sound 2 sound effect once you beat a stage then it'll sound that. 

 

The enemy explosion animation no longer resets itself. Setting the enemy HP to 249 won't rekill that object since if enemy HP is over 250, then it'll run the point subroutine, then change that object to number 20, and etc. 

I added 1 graphic strip to show the moon in the back ground.  And 1 intro to moonstrip. 

I slowed down the magic box color transformation, and it HP is 5.  Laser takes 5 hit to open it, and then the blue weapon, wave weapon, upgraded laser takes 3, wave2, missiles takes 2 to open. 

I reduce some enemy HPs. Their HP increases every boss defeated by 1.  The meteor becomes quicker too. 

 

If you open the box matching your upgraded weapon, then it no longer downgrade your current weapon. Such as if you have upgraded 3 laser weapon and you open the box if it is red, then you keep your 3 laser weapon.

The box's colors stands for:

red:laser/3 laser upgrade(if you have laser equipped)

blue:blue wave:blue blast

gray:missiles:rockets

green: 13-14 seconds invincibility

dark green: gives 25 points and restore health

yellow: Wave:Super Sonic Wave

White: restores health

 

And you blink blue when invincible now. 

 

Now I will start making the earth level.

And thank you for playing.



#12 nanochess ONLINE  

nanochess

    River Patroller

  • 4,690 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Tue Feb 24, 2015 1:57 PM

You don't need to read sequentially, if your data is labeled like this:

 

mydata: DATA 5,6,7,8,9,10,11,12

 

You can access it like:

 

a = mydata(5)

 

It's a powerful feature of IntyBASIC for having read-only arrays.



#13 Kiwi OFFLINE  

Kiwi

    Stargunner

  • Topic Starter
  • 1,353 posts

Posted Wed Feb 25, 2015 12:19 PM

I played around with the noise channel not knowing a lot about it. I thought at work how Colecovision soundchip have tone 3 to supplement the noise channel. I put SOUND 4 in the code and started experimenting with it. So I put guess data in the first argument and put different number in the 2nd argument.  So it looks like SOUND 4, &00111111,1. So I kept changing number in the mix til I get the channel I want noisy.  I found that $E0 is for channel 0 and 1 only with tone and $2A is for channel 1.  Kinda hard for me to figure out the diagram or finding how the diagram trying to intepret.  Anyway, here's the ROM with changed sound.

 

Attached File  SSUv4.rom   19.06KB   167 downloads

 

I changed the wave weapon sound effect and sounds better than I had before.  Missile, and the blast weapon sound effect supplement the noise channel.  And the enemy death sound have been combined with the noise channel. 

I'm seeing ahead that this final version of this game probably will exteed 16 Kilo Word.  There would be multiple of levels with it own set of enemies. And it a game I made before with Dezaemon, a skeleton shoot'em up game.  I grouped the level data into one gosub. So leveldata and enemy will have it own function in the game. 
 



#14 nanochess ONLINE  

nanochess

    River Patroller

  • 4,690 posts
  • Coding something good
  • Location:Mexico, Mexico

Posted Wed Feb 25, 2015 1:16 PM

Nice sound effects! :)



#15 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Wed Feb 25, 2015 1:17 PM

This should assist in figuring out how the noise generator works (and the envelope generator, when you wanna get fancy):

 

http://spatula-city....ramming/psg.txt



#16 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,755 posts
  • Location:@R6 (top of stack)

Posted Thu Feb 26, 2015 4:58 AM

I played around with the noise channel not knowing a lot about it. I thought at work how Colecovision soundchip have tone 3 to supplement the noise channel. I put SOUND 4 in the code and started experimenting with it. So I put guess data in the first argument and put different number in the 2nd argument.  So it looks like SOUND 4, &00111111,1. So I kept changing number in the mix til I get the channel I want noisy.  I found that $E0 is for channel 0 and 1 only with tone and $2A is for channel 1.  Kinda hard for me to figure out the diagram or finding how the diagram trying to intepret.
 

 

 

This should assist in figuring out how the noise generator works (and the envelope generator, when you wanna get fancy):

 

http://spatula-city....ramming/psg.txt

 

 

Ok, I took a quick glance at the IntyBASIC docs.  It appears SOUND 4 is the tone/noise select for channels A/B/C, and it corresponds to the Tone/Noise select register at $1F8 in the PSG documentation freeweed linked.

 

Only bits 0..5 in that register matter to sound generation; bits 6 and 7 should be set to 0.  Here's an excerpt from the doc freeweed linked, except I've massively improved the wording.  The original, stilted wording came in part (but not entirely) from the original data sheet.  I really should go back through all these documents I wrote 15+ years ago and give them a freshining up.  :)

.

Mixer Control - IO Enable (register R7)
    The lower six bits determine whether each channel carries noise, tone.
    All four combinations are possible:  neither, noise-only, tone-only, or both.
    The upper two bits determine the I/O direction for the I/O ports on the device.

                b7 input enable I/O port A   (0 = input, 1 = output)
                b6 input enable I/O port B   (0 = input, 1 = output)
                b5 noise enable channel C    (0 = enable, 1 = disable)
                b4 noise enable channel B    (0 = enable, 1 = disable)
                b3 noise enable channel A    (0 = enable, 1 = disable)
                b2 tone enable channel C     (0 = enable, 1 = disable)
                b1 tone enable channel B     (0 = enable, 1 = disable)
                b0 tone enable channel A     (0 = enable, 1 = disable)

.

 

So, some notes:  The hand controllers are connected to the I/O ports on the sound chip.  Theoretically, Papa Chandler had GI fix these ports to input-only on the Intellivision, according to some docs buried on the papaintellivision.com website.  But, just to be sure, always program bits 7 and 6 to 0 just in case there are units that actually honor the I/O port direction.  In fact, if IntyBASIC ever supports programming the second PSG in the ECS, I know for a fact that PSG does honor the I/O direction bits.  (Those are used to control keyboard scanning.)

 

For tone and noise mixing, tone and noise get mixed on a channel digitally as follows:

.

   output_a = ( tone_gen_a OR tone_enable_a ) AND ( noise_gen OR noise_enable_a )
   output_b = ( tone_gen_b OR tone_enable_b ) AND ( noise_gen OR noise_enable_b )
   output_c = ( tone_gen_c OR tone_enable_c ) AND ( noise_gen OR noise_enable_c )

.

This has a couple useful implications:

  • If you disable both tone and noise on a channel, the channel outputs a 1.  You can modulate this 1 into other sounds by setting the volume register alone.  A common trick is the use the envelope generator and set the envelope to a fast, repeating pattern.
  • If you enable both tone and noise, they get ANDed together as opposed to added together.  ANDing is roughly the same as multiplying.

For explosion sound effects, I've found it rather useful to enable both tone and noise, and combine a low-frequency tone with the noise to get a 'gritty' explosion. 

 

BTW, here's what I'm putting in the updated psg.txt:

 

 

Mixer Control - IO Enable (register R7)
    The lower six bits determine whether each channel carries noise, tone.
    All four combinations are possible:  neither, noise-only, tone-only,
    or both.

    The upper two bits determine the I/O direction for the I/O ports on
    the device.  On the Intellivision, these should normally be set to 0,
    except on the ECS when scanning the ECS keyboards.

                b7 input enable I/O port A   (0 = input,  1 = output )
                b6 input enable I/O port B   (0 = input,  1 = output )
                b5 noise enable channel C    (0 = enable, 1 = disable)
                b4 noise enable channel B    (0 = enable, 1 = disable)
                b3 noise enable channel A    (0 = enable, 1 = disable)
                b2 tone enable channel C     (0 = enable, 1 = disable)
                b1 tone enable channel B     (0 = enable, 1 = disable)
                b0 tone enable channel A     (0 = enable, 1 = disable)

    Within each channel, tone and noise are mixed as follows:

        output_A = ( tone_A OR tone_en_A ) AND ( noise_gen AND noise_en_A )
        output_B = ( tone_B OR tone_en_B ) AND ( noise_gen AND noise_en_B )
        output_C = ( tone_C OR tone_en_C ) AND ( noise_gen AND noise_en_C )

    If neither tone nor noise is enabled on a given channel, the channel
    outputs a logic 1, which may be modulated via the volume registers.

    If both tone and noise are enabled on a given channel, the tone and
    noise get ANDed together.  This can give some interesting effects,
    particularly with low-frequency tones.

 

 

I think that's clearer than the dreck that came from the datasheet, and was subsequently disimproved by me.



#17 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,791 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Thu Feb 26, 2015 5:30 AM

  • If you disable both tone and noise on a channel, the channel outputs a 1.  You can modulate this 1 into other sounds by setting the volume register alone.  A common trick is the use the envelope generator and set the envelope to a fast, repeating pattern.

 

Just to be sure I understand, disabling both noise and tone and setting the envelope to a fast repeating pattern... LFO modulation?



#18 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Thu Feb 26, 2015 8:49 AM


BTW, here's what I'm putting in the updated psg.txt:

 

 

I think that's clearer than the dreck that came from the datasheet, and was subsequently disimproved by me.

 

All of this will be invaluable info - please make sure you actually update the online psg.txt :)

 

I've had to clobber together an understanding from these mostly complete docs; let's be a bit nicer to the next person.



#19 intvnut OFFLINE  

intvnut

    River Patroller

  • 2,755 posts
  • Location:@R6 (top of stack)

Posted Thu Feb 26, 2015 9:21 AM

 

All of this will be invaluable info - please make sure you actually update the online psg.txt :)

 

Well, you linked to the Beta3 version of that document.  Beta3's never changing.  Unfortunately, I don't have things set up so you can view my latest SVN version over the web.

 

 

 

Just to be sure I understand, disabling both noise and tone and setting the envelope to a fast repeating pattern... LFO modulation?

 

Maybe not in the sense that's commonly understood (ie. for effects like tremolo).  It's the same old envelope generator.  Instead of setting the volume of a tone or the volume of some noise, it's setting the volume of a digital '1'.

 

Here's the way to think about it:  Digital 0s go out as 0v.  Digital 1s go out as some voltage between 0v and 1v determined by the volume register.   (Note: I'm using the voltages 0v and 1v as an example.  I don't know the precise voltage range in the Intellivision, but it's not necessary for understanding the mechanism to a first order.)

 

The volume steps on the PSG are spaced logarithmically, 1/sqrt(2) apart.  So, assuming a 0v to 1v range, the volume levels are roughly:

  • 15 = 1.0v
  • 14 = 0.707v
  • 13 = 0.5v
  • 12 = 0.354v
  • 11 = 0.25v
  • 10 = 0.177v
  •   9 = 0.125v
  • ... and so on
  •   0 = 0v

Logarithmic steps are perceptually uniform, but not uniform in voltage.  For slow volume changes, they work like you'd expect, like a volume knob, with each step corresponding to an equal turn of the volume knob.

 

The envelope generator changes the effective volume in unit steps between 0 and 15.  In the psg.txt file, they show different envelope waveforms:

          00xx          \__________________________________

          01xx          /|_________________________________

          1000          \|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\|\

          1001          \__________________________________

          1010          \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                          _________________________________
          1011          \|

          1100          /|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/
                         __________________________________
          1101          /

          1110          /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

          1111          /|_________________________________


For the repeating waveforms (1000, 1010, 1100, 1110), you get repeating ramps of 0..15, and/or 15..0 for the volume.  When applied to a tone or noise, you'll hear a tone or noise that gets louder and softer with time, and if the envelope frequency is slow enough, it'll sound like someone turning a volume knob up and down.  If you apply that exact same envelope to a digital '1', it probably won't sound like much of anything, because it'll be at a frequency below what humans can hear (20Hz).

 

But, the envelope generator can operate at frequencies in the audible range (ie. above 20Hz).  If you apply that fast envelope to noise or tone, it's a form of ring modulation.  You're multiplying the the envelope waveform with the tone or the noise waveform.   If you apply that envelope to a digital '1', you get to here the envelope by itself.

 

Now, I pointed out above that the voltages associated with the volume register are logarithmically spaced.  If you listen to a fast envelope, it's not going to sound at all like a triangle wave, despite being depicted as one.  It's due to that logarithmic spacing.  Instead, it's going to sound closer to being a series of impulses—ie. somewhat "prickly."

 

Indeed, it was just that technique I used for the "ghost steals back presents" sound effect in Christmas Carol.  Fast envelope applied to no-tone, no-noise channel, and I just modulated the envelope frequency in software.

 

 

And fun fact:  The RAZZ sound effect arises from applying a fast envelope to some low-pitched square waves, giving it its characteristic sound.


Edited by intvnut, Thu Feb 26, 2015 9:22 AM.


#20 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Thu Feb 26, 2015 9:44 AM

 

Well, you linked to the Beta3 version of that document.  Beta3's never changing.  Unfortunately, I don't have things set up so you can view my latest SVN version over the web.

 

 

I woulda just pulled it from one of the many "programming resources" threads here.

 

By all means, if there's a more current version online, or one that remains evergreen, please share :) I didn't even notice the URL to be honest. I kinda assume these sorts of docs don't exactly change much - serves me right. I guess there's always something new no matter how vintage we get.



#21 First Spear OFFLINE  

First Spear

    Stargunner

  • 1,029 posts

Posted Sat Feb 28, 2015 9:48 AM

If I wanted to use as much space as possible (breaking compatibility with the ECS), what statements would I add to an IntyBASIC program, and where? I was under the impression that the IntyBASIC compiler already took care of that, but if there is an edit to the prologue file or something I need to do, I'll do it (or anything else). 

 

I read http://atariage.com/...eat info there.

 

Thanks.

 

 

 

If you push past 16K, add this "somewhere" in your code (you can check the assembler listings to see where you're going over):

 

ASM ORG $C100

 

I usually end up stuffing the graphics/sound/other data after this point as that's the bulk of the ROM size after a while.



#22 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,791 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Sat Feb 28, 2015 11:03 AM

If I wanted to use as much space as possible (breaking compatibility with the ECS), what statements would I add to an IntyBASIC program, and where? I was under the impression that the IntyBASIC compiler already took care of that, but if there is an edit to the prologue file or something I need to do, I'll do it (or anything else). 

 

I read http://atariage.com/...eat info there.

 

Thanks.

 

 

 

What do you mean "breaking compatibility with the ECS"?  Using as much space as possible does not preclude supporting the ECS hardware, though it most likely forgoes the use of its BASIC.  However, that requires using the EXEC anyway, which nobody does.

 

As far as I know, IntyBASIC does not yet support multiple ROM segments automatically, so the best way to expand your program's ROM capabilities is to follow freeweed's advice.

 

 

     -dZ.



#23 freewheel OFFLINE  

freewheel

    River Patroller

  • 2,861 posts

Posted Sat Feb 28, 2015 12:06 PM

It's been a while since we've discussed this, and I know I'm missing pieces, but:

 

IntyBASIC, by default, will give you 8K words (16KB) to work with, from $5000-6FFF. ASM ORG $C100 will provide you with a contiguous section of 16K words (32KB), from $C100 TO $FFFF. So, you can easily get 24K words (48KB) by simply placing ASM ORG $C100 after your first 8K words (16KB). Note that ASM ORG $C100 is an IntyBASIC instruction. There's no need to modify the epilogue.asm for this.

 

From what I recall, there's another 3-4K words (6-8KB) you can obtain with a few other memory locations. I seem to remember some eventual total of 55KB or so that a person could very easily squeeze into a game. I just can't remember the memory locations offhand. The same principle applies though - you just insert another ASM ORG <<address>> statement where you want your final code to reside within the memory map.

 

What First Spear was referring to was this comment from catsfolly (I've added underlined notes of how many words each segment gets you, for those that don't instantly think in hex - double it to get KB):

 

 

SEGMENT RANGE ;;
;; 0 $5000 - $6FFF ;; - 8K
;; 1 $A000 - $C020 ;; - 8K
;; 2 $C022 - $FFFF ;; - 16K
;; 3 $2000 - $2FFF ;; - 4K
;; 4 $7100 - $7FFF ;; ~ 4K (just under)
;; 5 $4800 - $4FFF ;; - 2K
;; ;;
;; It also contains an additional RAM segment from $8040 - $9EFF. ;;
;; This memory map is available on the CC3, the Intellicart, and ;;
;; the JLP home brew production cart. ;;
;; ;;
;; Both memory maps insert a ROM header that configures the basics, ;;
;; bypasses the EXEC, configures a stack and then jumps to the user ;;
;; code. The 42K map also includes a small stub at $4800 that goes ;;
;; and switches out the ECS ROMs at $2xxx, $7xxx and $Exxx, so they ;;
;; do not interfere with the user's program.

 

Which requires some more fancy footwork, to page out ECS ROM. I don't even know if this is possible with IntyBASIC. And I don't know if 42K words (84KB) is actually possible on an Intellivision cartridge without page flipping. Notice that the first segment is the IntyBASIC default and the second is (more or less) what ASM ORG $C100 gains you. The others may or may not be usable from within IntyBASIC, I can't remember which are "safe".

 

intvnut has consistently posted the largest possible address layout without complex tricks (some people seemed to imply the limit was 16K words or 32KB); I just can't find an example offhand. Maybe it's a bit larger than I remember but I'm 95% sure it's between 50-60KB.


Edited by freeweed, Sat Feb 28, 2015 12:18 PM.


#24 DZ-Jay OFFLINE  

DZ-Jay

    Quadrunner

  • 9,791 posts
  • Triple-Stripe Mo' Bro
  • Location:NC, USA

Posted Sat Feb 28, 2015 12:12 PM

It's been a while since we've discussed this, and I know I'm missing pieces, but:

 

IntyBASIC, by default, will give you 8K words (16KB) to work with, from $5000-6FFF. ASM ORG $C100 will provide you with a contiguous section of 16K words (32KB), from $C100 TO $FFFF. So, you can easily get 24K words (48KB) by simply placing ASM ORG $C100 after your first 8K words (16KB).

 

From what I recall, there's another 3-4K words (6-8KB) you can obtain with a few other memory locations. I seem to remember some eventual total of 55KB or so that a person could squeeze into a game. I just can't remember the memory locations offhand.

 

Note that ASM ORG $C100 is an IntyBASIC instruction. There's no need to modify the epilogue.asm.

 

What First Spear was referring to was this comment from catsfolly:

 

 

Which requires some more fancy footwork, to page out ECS ROM. I don't even know if this is possible with IntyBASIC. And I don't know if 42K words (84KB) is actually possible on an Intellivision cartridge without page flipping. I haven't bothered doing the math but I know some of that scheme overlaps with the large $C100-$FFFF space.

 

intvnut has consistently posted the largest possible address layout (some people seemed to imply the limit was 16K words or 32KB); I just can't find an example offhand.

 

I believe the largest is about 42K without page-flipping.  My point about the ECS is that, you don't use the ECS anyway, since it requires using the EXEC, which nobody uses (and its API is not publicly documented).  This doesn't mean that your game is "incompatible" with the ECS, it means that it won't use the ECS' EXEC, just like an IntyBASIC game is not "incompatible" with the Master Component, it just bypasses the EXEC operating system.

 

     -dZ.



#25 5-11under OFFLINE  

5-11under

    River Patroller

  • 3,191 posts
  • Location:Ontario, Canada

Posted Sat Feb 28, 2015 1:13 PM

 

I believe the largest is about 42K without page-flipping.  My point about the ECS is that, you don't use the ECS anyway, since it requires using the EXEC, which nobody uses (and its API is not publicly documented).  This doesn't mean that your game is "incompatible" with the ECS, it means that it won't use the ECS' EXEC, just like an IntyBASIC game is not "incompatible" with the Master Component, it just bypasses the EXEC operating system.

 

     -dZ.

 

Question...

 

Looking at this: http://spatula-city..../memory_map.txt

 

If I use the areas $2xxx or $4000-$47FF or $7xxx or $Exxx in a game (ROM), will the game fail if an ECS is plugged in? Note that I don't want to use any ECS features; it's just a standard game.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users