Search the Community
Showing results for tags 'bataribasic'.
-
So, since I learned how bankswitching works I'd figured I go back and enhance My Lyra game. Originally it had 8 game variations, four of which operated like Joust where you destroy a set amount of enemies to advance (a call back to the original 2021 idea.) However this caused a confliction with the pfscore2 function. I went back and took out the four game modes. This caused the compiler to give me lip. I need help with this, I don't know what I did wrong. lyra_16k_2024y_04m_08d_1202t.bas
-
rem ************************************************************************ rem A project by Viggo Waller rem ************************************************************************ set kernel_options no_blank_lines set tv pal set romsize 16k set optimization speed set optimization size set smartbranching on set optimization noinlinedata set optimization inlinerand playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X...XXXXX.XXX.XXXXX.X....XXXX..X X.....X....X....X...X....X.....X X.....X....X....X...X....X.....X X.....X....X....X...X....XXX...X X.....X....X....X...X....X.....X X.....X....X....X...X....X.....X X.....X...XXX...X...XXXX.XXXX..X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end title COLUBK = $00 COLUPF = $0E drawscreen if joy0fire || joy1fire then goto skiptitle goto title skiptitle playfield: XXXXX....XXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X............................... X............................... ................................ ................................ ...............................X X..............................X X..............................X XXXX....XXXXXXXXXXXXXXXXXXXXXXXX end COLUBK = $00 missile0height = 4 : missile0y = 255 NUSIZ0 = $00 score = 00000 : scorecolor = $0E const _P_Edge_Top = 7 const _P_Edge_Bottom = 88 const _P_Edge_Left = 13 const _P_Edge_Right = 137 AUDV0 = 0 : AUDV1 = 0 COLUP1 = $0E COLUP0 = $0E COLUPF = $0E player0: %0110 %0110 %1111 %1010 %1111 %1001 end player0x = 77 : player0y = 53 __main if !joy0up then goto __Skip_Joy0_Up if player0y <= _P_Edge_Top then goto __Skip_Joy0_Up temp5 = (player0x-10)/4 temp6 = (player0y-7)/8 if temp5 < 34 then if pfread(temp5,temp6) then goto __Skip_Joy0_Up temp4 = (player0x-17)/4 if temp4 < 34 then if pfread(temp4,temp6) then goto __Skip_Joy0_Up temp3 = temp5 - 1 if temp3 < 34 then if pfread(temp3,temp6) then goto __Skip_Joy0_Up player0y = player0y - 1 __Skip_Joy0_Up if !joy0down then goto __Skip_Joy0_Down temp5 = (player0x-10)/4 temp6 = (player0y+1)/8 if temp5 < 34 then if pfread(temp5,temp6) then goto __Skip_Joy0_Down temp4 = (player0x-17)/4 if temp4 < 34 then if pfread(temp4,temp6) then goto __Skip_Joy0_Down temp3 = temp5 - 1 if temp3 < 34 then if pfread(temp3,temp6) then goto __Skip_Joy0_Down player0y = player0y + 1 __Skip_Joy0_Down if !joy0left then goto __Skip_Joy0_Left temp5 = (player0y-1)/8 temp6 = (player0x-15)/4 if temp6 < 34 then if pfread(temp6,temp5) then goto __Skip_Joy0_Left temp3 = (player0y-6)/8 if temp6 < 34 then if pfread(temp6,temp3) then goto __Skip_Joy0_Left player0x = player0x - 1 __Skip_Joy0_Left if !joy0right then goto __Skip_Joy0_Right temp5 = (player0y-1)/8 temp6 = (player0x-9)/4 if temp6 < 34 then if pfread(temp6,temp5) then goto __Skip_Joy0_Right temp3 = (player0y-6)/8 if temp6 < 34 then if pfread(temp6,temp3) then goto __Skip_Joy0_Right player0x = player0x + 1 __Skip_Joy0_Right if joy0left then a = a - 1 if joy0right then a = a + 1 if joy0left || joy0right then goto __skip_y_anim if joy0up then b = b + 1 if joy0down then b = b - 1 if b = 0 then player0: %1001 %0110 %1111 %0101 %1111 %1001 end if b = 5 then player0: %0110 %0110 %1111 %0101 %1111 %1001 end if b = 15 then player0: %0110 %0110 %1111 %1010 %1111 %1001 end if b = 20 then player0: %1001 %0110 %1111 %1010 %1111 %1001 end __skip_y_anim if a = 0 then player0: %1001 %0110 %1111 %0101 %1111 %1001 end if a = 5 then player0: %0110 %0110 %1111 %0101 %1111 %1001 end if a = 15 then player0: %0110 %0110 %1111 %1010 %1111 %1001 end if a = 20 then player0: %1001 %0110 %1111 %1010 %1111 %1001 end if a = 0 then a = 10 if a = 20 then a = 10 if b = 0 then b = 10 if b = 20 then b = 10 drawscreen __skipmove goto __main
-
Steamboat under attack and a new idea I had for homebrew. It's a simple game as captain of a steamboat, you will depend on a cannon to fight several enemy aerial targets that want to sink your boat. All of this starts on a beautiful evening, at sunset, but there will also be attacks at dusk. It is still in its development phase, a lot can still be added REV. ALPHA - 14/01/24 Steamboat Under Attack_Rev_Alpha.bas.bin REV. ALPHA 02 - 16/01/24 Steamboat Under Attack_Rev_Alpha02.bas.bin REV. ALPHA 03 - 09/02/24 Steamboat_UA_Rev03.bas.bin REV. ALPHA 04 - 11/02/24 Steamboat_UA_Rev04.bas.bin REV. ALPHA 05 - 14/02/24 (NTSC/PAL) Steamboat_UA_Rev05.bas.bin Steamboat_UA_Rev05(PAL).bas.bin REV. ALPHA 06 - 15/02/24 (NTSC/PAL) Steamboat_UA_Rev06_NTSC.bas.bin Steamboat_UA_Rev06_PAL.bas.bin REV. ALPHA 07 - 17/02/24 (NTSC/PAL) Steamboat_UA_Rev07_NTSC.bas.bin Steamboat_UA_Rev07_PAL.bas.bin
-
I've tried a variety of trackers and tools for generating music on the 2600. Some are more cumbersome than useful. Others are closer to toys than tools. My perfect TIA Tracker would have: - A familiar piano roll interface you'd see in some midi interfaces - Copy & Paste functionality - Internal playback so it doesn't have to launch an emulator - 1 or 2 Channels - Export volume, control, frequency, duration in sdata format for use in batari Basic What features would you like to see in a tool like this? I made this mockup to help visualize what it could look like. Unfortunately, I'm a better designer than I am a developer.
-
Unless bugs are identified this will be the final release of Heist. This release fixes a number of small bugs and implements a few additional features such as Bezerk style directional shooting (selectable via the Left Difficulty Switch). This release also makes (3) lives standard. Single life games are still selectable as games 4-6. I hope you enjoy. - Tim Gameplay Capture the money while avoiding the police and laser defenses. Once the money is in your possession a door will open. You still need to make it out of the bank to clear the level. All of this must be done before time runs out. Some levels are easier than others and the time is adjusted accordingly. Note that the police will not notice you until you are in their general proximity or you have taken the money. Once you capture the money all police become aware of your presence and they move with an increased sense of urgency (i.e., faster). There is a total of 20 levels using 10 playfields. Each playfield is displayed twice. The second time through you are given less time and the police move faster. If you complete all twenty levels you will flip the game and have the chance to play through them again. This time, however, the police will move faster and you will be limited to (4) bullets. Controls Movement: Use the left joystick to move left, right, up, down and on diagonals. Pause: Set the COLOR/BW switch to BW to pause the game. The playfield walls will turn lite gray and the player will face left to indicate that the game is paused. Set the switch back to COLOR to continue gameplay. Shooting: Behavior dependent upon position of Left Difficulty Switch. In either mode, the bullet travels in the direction that the player is presently moving. Mode A (Left Difficulty Switch A): If player is standing still then the bullet moves in the direction that the player last moved. This is similar to the behavior implemented in Berzerk released by Stern Electronics, Inc. in 1982. Mode B (Left Difficulty Switch B): If player is standing still then the bullet moves horizontally to the left when the player is facing left. Similarly, the bullet moves horizontally to the right when player is facing right. Game Variants Use Game Select switch while on Title Screen to cycle through game variants Game 1 – (3) Lives, Limited Time, Limited Bullets (Normal Game) Game 2 – (3) Lives, Unlimited Time, Unlimited Bullets Game 3 – (3) Lives, Unlimited Time, No Bullets Game 4 – Single Life, Limited Time, Limited Bullets Game 5 – Single Life, Unlimited Time, Unlimited Bullets Game 6 – Single Life, Unlimited Time, No Bullets Scoring $1000 for each money bag stolen. On games where you have more than one life you will lose the money if you are caught/die before clearing the level by making it through the exit door. Hints It may help your overall strategy to get the police to chase you. You can get their attention by moving close to them. This works even if you are protected behind a wall. Level Timers (Games 1 & 4) Level Time 1 30 seconds 2 24 seconds 3 30 seconds 4 24 seconds 5 20 seconds 6 16 seconds 7 28 seconds 8 24 seconds 9 14 seconds 10 12 seconds 11 20 seconds 12 16 seconds 13 20 seconds 14 16 seconds 15 36 seconds 16 32 seconds 17 20 seconds 18 16 seconds 19 24 seconds 20 20 seconds HEIST.bin HEIST Game Manual.pdf HEIST.bas I'm including the source code as it may help someone. I'm sure there are plenty of areas where the code could have been written better. Sometimes the 'hack' is actually a means of doing something without using additional variables. Other times what looks like a hack is truly a hack. It can be a little intimidating showing how the sausage is made... and there is no claim that anything performed by the code is the best way to do it.
- 23 replies
-
- 9
-
- bataribasic
- batari
-
(and 4 more)
Tagged with:
-
****UPDATE: V2.3**** Dramanoes_2.3.zip **Added new game rules and fixed bugs** Thanks to @ZeroPage Homebrew and their viewers for the feedback! Old version still attached for anyone who's interested/curious How to play: Two players (or one player and the computer) start with ten randomly selected numbered cards (Dramanoes), face down. During each turn, both players pick a Dramano to show each other. Once both players have picked a Dramano, they are flipped over, face-up, to reveal a number between 1 and 12. The player whose face-up Dramano has a higher (or lower, depending on the game mode) number than the other's flips it back over, face down. The other player discards theirs. The player who can make their opponent run out of Dramanoes wins the game! Controls: Left and Right: move selection cursor Fire: select Dramano Up: quick-assess Highlighted Dramano [If the highlighted Dramano's value is 7 or higher, it will nudge slightly. A potentially valuable strategy tool!] Down: reshuffle (re-randomize) your remaining Dramanoes [Can be done anytime, though best used in the case of a draw, the hope of improving your chances of winning, etc.] Select switch OR Left Joystick Left and Right on game select screen: choose game mode. Reset switch OR Left Joystick Fire on game select screen: starts/restarts the game. Left Difficulty Switch: SINGLE PLAYER MODES - affects probability that the Computer player will reshuffle their own Dramanoes after a certain point. You'll know that it shuffled when its cursor turns yellow. Right Difficulty Switch: SINGLE PLAYER MODES - affects randomness and amount of time the Computer player takes to select a Dramano. Game modes: 1 - Singleplayer, larger number wins 2 - Singleplayer, smaller number wins 3 - Two player, larger number wins 4 - Two player, smaller number wins Background: Though this is my first post here, I had actually dabbled a fair bit in bB several years ago and pretty recently decided to pick it back up. I originally made up this game IRL back in 2014 and decided to give an Atari 2600 port a shot. It had way too much randomness, which kinda defeated the point of the original concept. Just a couple weeks ago, I revisited the source code and completely overhauled it so that it would play as originally intended. I even went beyond that and gave it a touch of personality and character. Dramanoes_OLD.zip
- 5 replies
-
- 1
-
- bataribasic
- card game
-
(and 2 more)
Tagged with:
-
Hello, i am trying to split the screen with 2 colors (3/4 blue and 1/4 white), and I used the asm command in batari basic, what I am doing wrong? Pls help me. I keep getting 2 moving colors (ignore the color values). main asm lda #$5C LDX #96 START sta WSYNC dex bne START LDX #96 sta COLUBK START1 STA WSYNC dex bne START1 LDA #$A9 STA COLUBK end goto main
-
For about a month I have been studying a little bit of Assembly through the great material gathered on the Random Terrain website. (https://www.randomterrain.com/atari-2600-memories.html#assembly_language) Although I managed to create my own kernel, several parts of it I still don't understand. And instead of spending effort with such deep learning, I researched if it was possible to simply create a kernel for batariBasic and continue programming in bB. I found this post which presents a way to use a custom kernel. With some modifications I got to this version below. It's a 2LK and I'm trying to use the same variables as bB to control the players, but this is the problem: I can't (I don't have enough knowledge) use the players pointer correctly. Could anyone clarify my ideas? Player0Draw = $A4 ; I'm not using the vars (0-47) Player1Draw = $A5 BackgroundPtr = $A6 ; $A7 .customdrawscreen custom_eat_overscan ;bB code runs during overscan. We wait for overscan to finish so the ;frame timing doesn't get screwed up. lda INTIM bmi custom_eat_overscan custom_do_vertical_sync ;just a standard vsync lda #2 sta WSYNC ;one line with VSYNC sta VSYNC ;enable VSYNC sta WSYNC ;one line with VSYNC sta WSYNC ;one line with VSYNC lda #0 sta WSYNC ;one line with VSYNC sta VSYNC ;turn off VSYNC custom_setup_vblank_timing ;use bB timing variables so it should work with both PAL and NTSC ifnconst vblank_time lda #42+128 else lda #vblank_time+128 endif sta TIM64T ; feel free to throw useful pre-kernel code in here, so long as it ; completes before vblank is over. custom_eat_vblank ;wait for vblank to complete lda INTIM bmi custom_eat_vblank lda #0 sta WSYNC sta VBLANK custom_setup_visible_timing ;my preference is to use TIM64T to ensure a full screen is drawn. lda #230 sta TIM64T ;------------------------------------------------------------------------------ ; Desenha a parte superior da tela ; 192 - 22 scanlines = 192 - (11*2) = 170 lda #$02 ; Cor cinza no PF sta COLUPF ; COR no PF lda #1 ; sta CTRLPF ; Liga o REFLECT ldx #11 UpperSection: sta WSYNC lda customPFPattern,x sta PF0 sta PF1 sta PF2 lda customPFColor,x sta COLUBK sta WSYNC dex bne UpperSection stx PF0 stx PF1 stx PF2 ; y position lda #80 adc player0height sbc player0y sta Player0Draw ;------------------------------------------------------------------------------ ;-- AREA DE JOGO ;------------------------------------------------------------------------------ ; Desenha a área de jogo ; 170 - 160 scanlines = 170 - (80*2) = 10 (base ... not implemented) ldy #80 ; Carrega o y com o tamanho da área de jogo KernelLoop: ; 15 - todal de 15 ciclos, vindos do bne KernelLoop ; Continuação da segunda linha do 2LK ; precalcula os dados usados na primeiralinha do 2LK lda player0height ; 2 17 - altura do Player0 - IMPORTANTE!! este valor deve ser altura-1 dcp Player0Draw ; 5 22 - Decrementa Player0Draw e compara com a altura bcs DoDrawGrp0 ; 2 24 - (3 25) se o Carry estiver setado, player0 está na scanline atual lda #0 ; 2 27 - caso contrário, desliga o player0 .byte $2C ; 4 31 - $2C = BIT with absolute addressing, trick that ; causes the lda (HumanPtr),y to be skipped DoDrawGrp0: ; 25 - 25 ciclos do pior caso na linha bcs DoDrawGrp0 lda (player0pointer),y ; 5 30 - carrega o formato do player0 <<----------------------------- It's not working sta WSYNC ; 3 33 - Aguarda o fim da scanline ;------------------------------------------------- ; começo da primeira linha do 2LK sta GRP0 ; 3 3 - @ 0-22, desenha o player0 efetivamente (entre os ciclos 0 e 22) lda (BackgroundPtr),y ; 5 8 - Atualizo a linha do BG sta COLUBK ; 3 11 - guardo o valor do BG no resitrador COLUPF lda (player0color),y ; 5 16 - Pega a cor do Player0 sta COLUP0 ; 3 19 - seta a cor do Player0 ; todo esse código acima precisa estar entre o ciclo 0 e 22 ; para adicionar mais alguma coisa neste scanline, é preciso liberar algo acima ; sobraram apenas 3 ciclos ... é possível ainda colocar algum padrão de PF em PF1 e PF2 ;-------------------------------------------------- ; pre calcula os dados necessáriso para a segunda linha do 2LK ; lda player1height ; 2 21 - altura do Player0 - IMPORTANTE!! este valor deve ser altura-1 ; dcp player1y ; 5 26 - Decrementa Player1Draw e compara com a altura ; bcs DoDrawGrp1 ; 2 28 - (3 18) se o Carry estiver setado, player1 está na scanline atual ; lda #0 ; 2 31 - caso contrário, use 0 para desligar o player1 ; .byte $2C ; 4 35 - $2C = BIT with absolute addressing, trick that ; causes the lda (BoxPtr),y to be skipped DoDrawGrp1: ; 28 - 28 ciclos vindo do bcs DoDrawGRP1 ; lda (player1pointer),y ; 5 32 - Carrega a aparencia do player1 sta WSYNC ; 3 35 - Aguarda o inicio de uma nova scanline ;--------------------------------------- ; inicio da segunda linha do 2LK ; sta GRP1 ; 3 3 - @0-22, desenha o player1 efetivamente (entre os ciclos 0 e 22) ; lda (player1color),y ; 5 8 - Pega a cor do Player1 ; sta COLUP1 ; 3 11 - seta a cor do Player1 ; todo o codigo acima precisa estar entre os ciclos 0 e 22. ; ainda há 11 ciclos sobrando, talvez um playfield ou ball, ou missile ; possa entrar aqui neste ponto. dey ; 2 13 - decrementa o y bne KernelLoop ; 2 15 - se não for igual a zero, pula plá pra cima ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ sty COLUBK custom_eat_visible ;wait for the visible display to complete lda INTIM bne custom_eat_visible custom_setup_overscan_timing ifnconst overscan_time lda #35+128 else lda #overscan_time+128-3-1 endif sta TIM64T lda #%11000010 sta WSYNC sta VBLANK ;bB macro to return from a bank-switch gosub or from a regular gosub. RETURN customPFPattern .byte %11011001 .byte %11111111 .byte %11011001 .byte %11001001 .byte %11011111 .byte %11011001 .byte %11011001 .byte %11001001 .byte %01001001 .byte %01001001 .byte %01001001 .byte %01001001 .byte %11001001 .byte %00001000 .byte %00001000 .byte %11001001 .byte %11011001 customPFColor: .byte $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00, $AA, $00 Thanks in advance.
-
error Batari Basic and VisualbB script and parameter errors
B_Studios posted a topic in batari Basic
Hello, I'm currently a newbie to Batari Basic and Visual bB for the Atari 2600 and had only begun to set up both programs. I installed both Batari Basic 1.5 and Visual bB build 568. So far according to the Windows 10 installation method I had extracted both zipped files and placed them together in a folder labeled "Atari2600". From there I launched the Visual bB configuration wizard and ran the install_win batch file. From there I am able to launch the Visual bB however I get error windows claiming to be script errors. I'm able to skip or ignore these messages and go into the program, from there everything appears to work as normal and I'm able to compile my code which at the moment has only been a playfield. When I test my code in the built in emulator, I'm then presented with an error regarding the file which will not allow me to run the code. Could I have possibly made an error while installing both programs or made an error with the configuration wizard? Any help or guidance would be greatly appreciated!- 3 replies
-
- scripts
- bataribasic
- (and 7 more)
-
Hello. Using batari basic, I pfscroll down for a graphical effect. Number of scrolls down is random and varies according to input. On a new screen I attempt to draw a new playfield, but now it is mis-aligned because I scrolled it previously. How can I reset the starting playfield blocks to their default position without having to know the exact number of times they were scrolled? Is this possible to do in batari? Please help.
-
- bataribasic
- bataribasic
-
(and 4 more)
Tagged with:
-
I'm trying to make a home console port of Space Race using visual batari basic. (Its my first time coding a game). I'm coding my game. Everything is going fine, but when I compile and then attempt to test the game with Stella, an error message appears in Stella. Fatal Error Invalid Instruction. So I tried it with Z26. But when I compile and open the game, instead of opening the game, it opens to a black screen with the word jammed at the bottom. Please help me. I looked everywhere but I haven't found a way to fix this.
-
i am in the process of making a game and well i don't know how to make an enemy shoot i only want the enemy to shoot down and up according to player 0's y position can any one help?
-
Ideas I just had to get out. Quick mock-up. Would be a great AtariVox+ game, because the Arcade version talks a LOT. Thanks again to RT and his website for the start of virtual player collision detection!!!! I could not find any info on what is commonly done like in 2600 Space Invaders - where it detects a collision with a copied sprite, and then how you have to shuffle things around depending on the order you shoot the triple or double copies. Shows I got it to work. Also the 1 pixel fuel decay using PF blocks and the ball. I found that a cool trick. Also thought about just a playfield block going from 4 high to 3, 2, 1, 0 and then decay the next one, and so on.
-
For anyone interested, I've made a little command line tool called pngParse that reads a palette png image and a sprite png image and outputs sprite table data formatted for batariBasic or 6502 ASM. bBpP_1.0.0.zip Notes on use: pngParse doesn't approximate colors: it identifies colors between the sprite image and the palette image by comparing r/g/b values, so for your sprite image to accurately be parsed, its colors must exactly match the colors in the palette. pngParse can take custom palettes of 8x16 pixels. Palettes for NTSC and PAL are already included in the attached zip file. if you don't specify a custom palette file, pngParse will expect to find ntsc.png or pal.png (depending on the -P flag) in the same directory. Output will go to output.txt by default. Sprite images must have a width divisible by 8. Sprite images wider than 8 pixels will be parsed as a separate sprite, so you can input a 64x13 pixel sprite sheet and pngParse will output 8 8x13 pixel sprites. Flags: -s "spritesheet.png" Specifies the input spritesheet (required). -p "secam.png" Specifies the input palette image (ignores the -P flag) -o "spriteData.txt" Specifies the output file (output.txt by default) -P Uses the PAL palette (NTSC by default) -D Formats output for the DPC kernel (standard kernel formatting by default) -A Formats output for 6502 ASM (batariBasic formatting by default)
- 2 replies
-
- batariBasic
- bB
-
(and 1 more)
Tagged with: