dalves Posted September 29, 2016 Author Share Posted September 29, 2016 Thanks Groovybee. Sorry for the stupid question, but when you say 42K decles, does that mean that when I compile my code to a ROM using IntyBasic SDK the ROM should be less than 42K? Sorry, but as I'm still new, I don't know about decles or bank switching. 1 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted September 29, 2016 Share Posted September 29, 2016 Thanks Groovybee. Sorry for the stupid question, but when you say 42K decles, does that mean that when I compile my code to a ROM using IntyBasic SDK the ROM should be less than 42K? Sorry, but as I'm still new, I don't know about decles or bank switching. Check out my example called 42k.bas in the contribs folder in IntyBASIC. That explains the memory map you'll have and how to separate your code using the asm org statement. The Inty CPU is 16 bit so it deals in words (2 bytes). Normally, when we say 42K we mean 42K words (or decles), so thats 84K bytes. Quote Link to comment Share on other sites More sharing options...
dalves Posted September 29, 2016 Author Share Posted September 29, 2016 Perfect. Thank you for the explanation. I will check out the 42K.bas to understand it better. 1 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 14, 2016 Share Posted October 14, 2016 Hi. Thanks to IntyBasic and now to LTO cart, I would like to program a game for Intellivision. I think I will convert my Atari VCS game L.E.M. Here's my first question. Does someone have a code to display the standard Mattel Intellivision title screen? Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 14, 2016 Share Posted October 14, 2016 I think I will convert my Atari VCS game L.E.M. There are a couple of other lander style games on the Inty. There is one in the samples folder in the IntyBASIC release called lander.bas and also one called Descent which is a mini game in my Mars Minis. Its a good first project though. Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted October 14, 2016 Share Posted October 14, 2016 Hi. Thanks to IntyBasic and now to LTO cart, I would like to program a game for Intellivision. I think I will convert my Atari VCS game L.E.M. Here's my first question. Does someone have a code to display the standard Mattel Intellivision title screen? Hello World.gif The question is not if there is a sample of the Mattel screen (there is, I used a modified version of it in the IntyBASIC Showcase game, check the thread for a video) but why do you want to? You aren't making a game for Mattel and the Intellivision is capable of a lot graphics wise that you can create some incredible, even animated, title screens, way more interesting that the old text based Mattel one. Look at the IntyColor tool included with IntyBasic as well as the sample and contrib sub folders (where you will find an existing Lander game sample.) There are also several tutorials in the programming thread showing how to create a compatible bitmap and process it with IntyColor to produce the IntyBASIC code. There are a couple of other lander style games on the Inty. There is one in the samples folder in the IntyBASIC release called lander.bas and also one called Descent which is a mini game in my Mars Minis. Its a good first project though. And a couple more people haven't announced... Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 14, 2016 Share Posted October 14, 2016 There are a couple of other lander style games on the Inty. There is one in the samples folder in the IntyBASIC release called lander.bas and also one called Descent which is a mini game in my Mars Minis. Its a good first project though. Mars Minis/Descent (2013) is very nice (I like fuel bar) and similar to my LEM (2010), especially the fact you have to avoid asteroids. Is it programmed in IntyBasic? Is it free to download like LEM? 1 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 14, 2016 Share Posted October 14, 2016 Mars Minis/Descent (2013) is very nice (I like fuel bar) and similar to my LEM (2010), especially the fact you have to avoid asteroids. Is it programmed in IntyBasic? Is it free to download like LEM? Its all in assembly language. The ROM for Mars Minis will be released on Hive. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 15, 2016 Share Posted October 15, 2016 I know well lunar lander genre games are not so original. I wrote that in 2008 when I released L.E.M. for Atari 8-bit computers! But L.E.M. it's a sort of "hello world" for me. With this game I test different platforms capabilities using simple modern programming tools. I programmed it for Commodore 64, Atari 8-bit and Atari VCS; I hope to program it for Intellivision too! Regarding title screen, I managed to have a nice one for Atari VCS, I know IntyColor tool exists (not tested it yet) so I think I would be able to make a nice one for Inty too. If I am not wrong, every card can have a different background and foreground color. BTW, thanks for the replies and for the help! Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 15, 2016 Share Posted October 15, 2016 If I am not wrong, every card can have a different background and foreground color. It depends what video mode you are in. The Intellivision has foreground/background mode and colour stack mode. In foreground/background mode the foreground colour can be any of the first 8 colours and the background any of the 16 colours. In colour stack mode, the foreground colour can be any of the 16 colours, but the background colour can only be 1 of 4 (accessed in sequential order and can only be advanced one colour at a time by setting the appropriate bit in the BACKTAB location for that card). 1 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 15, 2016 Share Posted October 15, 2016 I store X and Y positions of sprite in variables #LemPosX and #LemPosY. I think this code doesn't work when values have decimals digits (for example 45.40): SPRITE 1, #LemPosX + VISIBLE, #LemPosY, SPR00 + SPR_GREY Quote Link to comment Share on other sites More sharing options...
Kiwi Posted October 15, 2016 Share Posted October 15, 2016 It doesn't use decimals. Number 0-255 are valid numbers for x and y position, exception for y, anything above 128 will trigger the 16 lines cards. One thing you could do is to use a temporary value to get rid of the decimals position is to divide by 256 to get value 45. I don't know the exact behavior with intybasic with variable that have decimal, but I assuming that 45.40 is 4540 as actual variable. Or you could use a 2nd 8-bit variable to hold the subpixel position of the sprite. And use the 8-bit pixel position to use for your update sprite position. sprite 0, herox+visible, heroy, SPR00 + SPR_GREY 1 Quote Link to comment Share on other sites More sharing options...
freewheel Posted October 16, 2016 Share Posted October 16, 2016 There's no such thing as "half a pixel" IntyBASIC is all integer math. If you use 45.40, it *should* store it as 45. But it will also store 45.90 as 45, so if you're wanting rounding you'll have to deal with it yourself. Note: I haven't tested every single possible math function and assignment, but in my experience IntyBASIC just ignores anything past the decimal point. You WILL get an error from the compiler if you try to assign directly, however. 1 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 16, 2016 Share Posted October 16, 2016 If you use 45.40, it *should* store it as 45. Thats not right. Its stored as 26157 or $662D. Where $2D corresponds to 40 in hex and $66 is 0.4 * 256 = 102.4 =~ $66. Although there appears to be a "bug" in the compiler where you always need to specify a digit before the decimal point e.g. #a=#a+.1 will add 1 to the float but #a=#a+0.1 will add the correct amount e.g. 6656. Why store the integer part in the LSB and not the MSB, it makes the maths easier on the compiler, because it can make use of the add with carry opcode. 1 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 16, 2016 Share Posted October 16, 2016 Looking at the assembly language, this should work :- include "constants.bas" #lemx=80.1 #lemy=45.9 DEFINE DEF00,1,ShipData loop: wait sprite 0, (#lemx AND 255)+VISIBLE, (#lemy AND 127), SPR00+SPR_GREY #lemx=#lemx+0.25 goto loop ShipData: BITMAP "...##..." BITMAP "...##..." BITMAP "..####.." BITMAP "..####.." BITMAP ".######." BITMAP ".######." BITMAP "########" BITMAP "########" However the adcr opcode is not generated during the the #lemx=#lemx+0.25 sequence so the sprite never moves. 1 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted October 16, 2016 Share Posted October 16, 2016 I'm a little late here, but just to give my two-cents, I prepared a simulated Mattel Electronics title screen for the default project in the SDK v2. It is not out yet, but I can send you the title screen code if you are still interested. It works by itself. This is how it looks like: -dZ. 2 Quote Link to comment Share on other sites More sharing options...
freewheel Posted October 16, 2016 Share Posted October 16, 2016 Thats not right. Its stored as 26157 or $662D. Ah. Depends on if you're trying to cram it into an 8-bit or 16-bit variable. I've never bothered trying to put screen co-ordinates into a 16-bit variable, for obvious reasons. If you use #x=45.50, it will indeed store it as 26157. x=45.50 results in x=45. Quote Link to comment Share on other sites More sharing options...
+Philsan Posted October 16, 2016 Share Posted October 16, 2016 Thank you everyone. Nice idea James! Unfortunately I am stuck. This code doesn't seem to work: Main: #lemmovy=#lemmovy+0.01 IF #lemmovy>2 then #lemmovy=2 IF CONT1.UP THEN GOSUB Controller_Up lemposx=lemposx+#lemmovx lemposy=lemposy+#lemmovy SPRITE 1, lemposx + VISIBLE, lemposy, SPR00 + SPR_GREY WAIT GOTO Main Controller_Up: PROCEDURE #lemmovy=#lemmovy-0.02 RETURN END Quote Link to comment Share on other sites More sharing options...
+nanochess Posted October 16, 2016 Share Posted October 16, 2016 This should work: (note the extraction of integer using AND 255, also you cannot easily check for less or greater with fractions) Main: #lemmovy=#lemmovy+0.01 IF (#lemmovy AND 255) = 2 then #lemmovy=2 IF CONT1.UP THEN GOSUB Controller_Up #lemposx=#lemposx+#lemmovx #lemposy=#lemposy+#lemmovy SPRITE 1, (#lemposx AND 255) + VISIBLE, #lemposy AND 255, SPR00 + SPR_GREY WAIT GOTO Main Controller_Up: PROCEDURE #lemmovy=#lemmovy-0.02 RETURN END Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted October 16, 2016 Share Posted October 16, 2016 you cannot easily check for less or greater with fractions) Why? Just do a "swap r0" to get the right byte order and then multiply the constant to be compared against by 256 (if its an integer) if its fixed point comparison then convert and swap endianess too. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted October 16, 2016 Share Posted October 16, 2016 Why? Just do a "swap r0" to get the right byte order and then multiply the constant to be compared against by 256 (if its an integer) if its fixed point comparison then convert and swap endianess too. Check in the current version* Hehe Quote Link to comment Share on other sites More sharing options...
dalves Posted October 18, 2016 Author Share Posted October 18, 2016 I'm not sure how many out there are familiar with Atari's "Worm War 1", but I am working on an Intellivision version. I am VERY new to scrolling and I've been able to scroll the multicolored side bars on the screen by using the "Scroll.bas" as an example. I was trying to place the timer at the top of the screen and the score at the bottom. I was wondering if there are any examples out there of having stationary text while the rest of the background is scrolling? Quote Link to comment Share on other sites More sharing options...
+nanochess Posted October 18, 2016 Share Posted October 18, 2016 The only way is using fixed sprites, but given there are only 8 available to display is a little used option. Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted October 18, 2016 Share Posted October 18, 2016 The only way is using fixed sprites, but given there are only 8 available to display is a little used option. That's one way, and definitely the easiest. However, it is not the only option. You could "scroll" the text in reverse by cycling GRAM on the BACKTAB cards of the HUD. An example of this is in Arnauld Chevallier's "Spirit" demo. This is the "old-school" technique of doing this in the demo-scene. -dZ. 1 Quote Link to comment Share on other sites More sharing options...
carlsson Posted October 18, 2016 Share Posted October 18, 2016 One of those other WIP homebrews solved it with having the score just scroll along the screen, repeated (redrawn) every 15-20 cards or so. It might look awkward, but gives a certain unique flair to the Intellivision games supporting smooth scrolling, though the entire screen at once. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.