+atari2600land Posted September 16, 2014 Share Posted September 16, 2014 OK, so I'm making this game here. After the title screen, the sprite is supposed to be at the lower left side of the screen and is not supposed to be moving until the player presses the disc in a direction. Instead, what happens is the sprite comes out of the lower right side of the screen and moves left automatically. I don't know why this is happening. If I get rid of "if cont1.left then dir=1" then everything works ok, except I can't move left. So apparently I must be a total idiot. Also, I don't have very much code as you can see, but it's already up to 3k. I'm wondering if I can even make a full-fledged game out of this. I assume from what I've read, I can go up to 16k. gosub.bas Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 16, 2014 Share Posted September 16, 2014 I've tested it with jzintv and it works just fine, after pressing a button in title screen, the apple stays quiet until I press arrows. Maybe you could add "dir = 0" after mazemain: label in order to stop apple when disc is not pushed. 1 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted September 16, 2014 Share Posted September 16, 2014 I was about to type the same thing as Nanochess. I tried it and it worked for me. 1 Quote Link to comment Share on other sites More sharing options...
catsfolly Posted September 16, 2014 Share Posted September 16, 2014 Every program includes the intybasic_prologue.asm and intybasic_epilogue.asm files that provide various library routines. So this makes your program take up a few kbytes of memory right of the bat. But you can still add lots of basic code. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 16, 2014 Author Share Posted September 16, 2014 Well then I don't know what to do. Perhaps I need a better version of jzintv? I have 1.0 beta 4. By the way, it's supposed to be a submarine. I can't draw. I want the sub to move when the disc is not pressed, though. Quote Link to comment Share on other sites More sharing options...
catsfolly Posted September 16, 2014 Share Posted September 16, 2014 Here is my gosub.asm that is produced by Intybasic. Can you file compare this with your version? gosub.asm Catsfolly Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 16, 2014 Author Share Posted September 16, 2014 I looked through and everything looks about the same. Here is my gosub.asm. gosub.asm Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 16, 2014 Share Posted September 16, 2014 I just compared your output with my output and is same. Maybe some jzintv configuration option that keeps left pressed? Quote Link to comment Share on other sites More sharing options...
catsfolly Posted September 16, 2014 Share Posted September 16, 2014 (edited) dirbits= peek(511) AND $ff temp = dirbits/16 if temp > 9 then print at 30, (temp + 23) * 8 + 6 else print at 30, (temp + 16) * 8 + 6 temp = dirbits AND $0f if temp > 9 then print (temp + 23) * 8 + 6 else print (temp + 16) * 8 + 6 If you put these lines in your main loop, they will display the direction code as seem by the basic program. Edited September 16, 2014 by catsfolly Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 16, 2014 Author Share Posted September 16, 2014 I think I found the problem but I don't know how to fix it. Apparently on my computer Fire also acts as left. Why? Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted September 16, 2014 Share Posted September 16, 2014 I wondering if it is more a emulator/windows issue. I sometimes get it as well. I have a title screen, an instructions screen, then the game. Sometimes I will press a button on the title and it will go straight thru to the games screen after displaying the instructions screen for a few frames. I have waits in the proper places which should be denouncing the controller or clearing the keyboard buffer. I'll have to try a different emulator. I can't wait until I get my hands on an LTOFlash! device. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 16, 2014 Author Share Posted September 16, 2014 OK, another thing I found is the problem happens when I press the ENTER on the numbers part (the right hand side) of the keyboard. It doesn't happen if I press the right SHIFT button on my keyboard. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted September 16, 2014 Share Posted September 16, 2014 OK, another thing I found is the problem happens when I press the ENTER on the numbers part (the right hand side) of the keyboard. It doesn't happen if I press the right SHIFT button on my keyboard. Ok, that's the problem. When pressing any key from pad, the Intellivision generates the code using the bits from buttons AND directions. I'm afraid there isn't a way to separate it, except to put a small delay (anti-bouncing) after your title screen in order to allow the user to release the Enter key before entering in your main loop. Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted September 16, 2014 Share Posted September 16, 2014 Well then I don't know what to do. Perhaps I need a better version of jzintv? I have 1.0 beta 4. By the way, it's supposed to be a submarine. I can't draw. I want the sub to move when the disc is not pressed, though. Try submarine: BITMAP "00001100" BITMAP "00001000" BITMAP "00001100" BITMAP "10111110" BITMAP "11111111" BITMAP "11111111" BITMAP "11111111" BITMAP "01111110" And maybe double wide the sprite SPRITE 0,X1+$300+MB_X_XSIZE,Y1+$100,$0807 Another tip is to include this set of constants from one of the examples to make your life easier REM some Intellivision hardware constants CONST BACKTAB = $0200 CONST CS_GRAM = $0800 ' get picture from gram CONST CS_CARD = $01f8 ' gram or grom card number CONST MB_X_XPOS = $00FF ' mask for x pos CONST MB_X_INTR = $0100 ' enable collision regs CONST MB_X_VIS = $0200 ' make mob visible CONST MB_X_XSIZE = $0400 ' double size in x CONST MB_Y_YPOS = $007F ' mask for y pos CONST MB_Y_YRES = $0080 ' 16 bits in y CONST MB_Y_YSIZ2 = $0100 ' double y size CONST MB_Y_YSIZ4 = $0200 ' 4 times y size CONST MB_Y_YSIZ8 = $0300 ' 8 times y size CONST MB_Y_XFLIP = $0400 ' x flip CONST MB_Y_YFLIP = $0800 ' y flip CONST MB_A_GRAM = $0800 ' get picture from gram CONST MB_A_CARD = $07f8 ' mask for picture no. CONST MB_A_PRIO = $2000 ' priority (above/below bkgnd) REM colors for color stack, border, etc CONST C_BLK = $0 ' Black CONST C_BLU = $1 ' Blue CONST C_RED = $2 ' Red CONST C_TAN = $3 ' Tan CONST C_DGR = $4 ' Dark Green CONST C_GRN = $5 ' Green CONST C_YEL = $6 ' Yellow CONST C_WHT = $7 ' White CONST C_GRY = $8 ' Grey CONST C_CYN = $9 ' Cyan CONST C_ORG = $A ' Orange CONST C_BRN = $B ' Brown CONST C_PNK = $C ' Pink CONST C_LBL = $D ' Light Blue CONST C_YGR = $E ' Yellow-Green CONST C_PUR = $F ' Purple rem colors for backtab or mob a CONST X_BLK = $0 ' Black CONST X_BLU = $1 ' Blue CONST X_RED = $2 ' Red CONST X_TAN = $3 ' Tan CONST X_DGR = $4 ' Dark Green CONST X_GRN = $5 ' Green CONST X_YEL = $6 ' Yellow CONST X_WHT = $7 ' White CONST X_GRY = $1000 ' Grey CONST X_CYN = $1001 ' Cyan CONST X_ORG = $1002 ' Orange CONST X_BRN = $1003 ' Brown CONST X_PNK = $1004 ' Pink CONST X_LBL = $1005 ' Light Blue CONST X_YGR = $1006 ' Yellow-Green CONST X_PUR = $1007 ' Purple 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.