Jump to content

MemberAtarian

Members
  • Content Count

    388
  • Joined

  • Last visited

Everything posted by MemberAtarian

  1. As you can see, I made some progress on the game. You get a menu first where you can set if you want to play against another player or the computer, and, of course, how much money you get, how many steps and turns you have. I spent many days with the code for the mouse, nearly even doing it entirely in assembly, but it got too complicated at some point. You may say that the mouse is a bit too sensitive, because it reads it twice during overscan, one during vblank and 3 times during the drawscreen and if you are moving it more gently, it won't jigger around. It's not a fast paced game anyway. Of course, you can use the joystick, if you want to, but even ST and Amiga mouse is compatible (or the equal trackball). Here will come the hard part, coding the drawing of the buildings and ships, it will be a nightmare for sure.
  2. Thank you, I always feel that my weakness is the sound part of programming, I have no good ear for tones.
  3. It can be done in bB, but only with the standard kernel, with a lot of playfield manipulation.It has one disadvantage: It eats up CPU cycles fast.
  4. "Don't touch anything, everything will kill you", you should call this game "Australia", it has a big spider anyway!
  5. Have a lot of common with both games and really love it! That spider is just amazing.
  6. I put the CheckMouse in bB code in bank8, outside the kernel, now it's working fine.
  7. Dunno why it happens, sometimes is seems like its nearly working, but goes off. It's not restarting, but the screen freezes. I tried it even with the exact locations in the ROM, starting with $F, because it's rorg-ed, but the result was the same. Krystof told me not to do bankswitch in the middle of an important kernel, maybe he is right, but my code is just too long to translate into assembly (or just copy it out from the temp output assembly of bB and copy it to the kernel), it gives "branch too long". Anyway, my bB code is like this: if switchleftb then goto SetAmiga1 SetAtariST1 if !joy0up && !joy0down then goto Dir1 if joy0up && !joy0down then goto Dir2 if joy0up && joy0down then goto Dir3 if !joy0up && joy0down then goto Dir4 SetAmiga1 if !joy0right && !joy0down then goto Dir1 if joy0right && !joy0down then goto Dir2 if joy0right && joy0down then goto Dir3 if !joy0right && joy0down then goto Dir4 Dir1 if !a{0} && !a{1} then a{2} = 0 : goto NewWay if a{0} && !a{1} then a{2} = 1 : a{3} = 0 : goto TO1 if !a{0} && a{1} then a{2} = 1 : a{3} = 1: goto TO1 if a{0} && a{1} then a{2} = 0 : goto NewWay TO1 a{0} = 0: a{1} = 0: goto Dir Dir2 if a{0} && !a{1} then a{2} = 0 : goto NewWay if a{0} && a{1} then a{2} = 1 : a{3} = 0 : goto TO2 if !a{0} && !a{1} then a{2} = 1 : a{3} = 1 : goto TO2 if !a{0} && a{1} then a{2} = 0 : goto NewWay TO2 a{0} = 1: a{1} = 0: goto Dir Dir3 if a{0} && a{1} then a{2} = 0 : goto NewWay if !a{0} && a{1} then a{2} = 1 : a{3} = 0 : goto TO3 if a{0} && !a{1} then a{2} = 1 : a{3} = 1 : goto TO3 if !a{0} && !a{1} then a{2} = 0 : goto NewWay TO3 a{0} = 1: a{1} = 1: goto Dir Dir4 if !a{0} && a{1} then a{2} = 0 : goto NewWay if !a{0} && !a{1} then a{2} = 1 : a{3} = 0 : goto TO4 if a{0} && a{1} then a{2} = 1 : a{3} = 1 : goto TO4 if a{0} && !a{1} then a{2} = 0 : goto NewWay TO4 a{0} = 0: a{1} = 1 Dir if player0x>1 && a{2} && a{3} then player0x=player0x-2 if player1x<152 && a{2} && !a{3} then player0x=player0x+2 NewWay if switchleftb then goto SetAmiga2 SetAtariST2 if !joy0left && !joy0right then goto Dir5 if joy0left && !joy0right then goto Dir8 if joy0left && joy0right then goto Dir7 if !joy0left && joy0right then goto Dir6 SetAmiga2 if !joy0left && !joy0up then goto Dir5 if joy0left && !joy0up then goto Dir8 if joy0left && joy0up then goto Dir7 if !joy0left && joy0up then goto Dir6 Dir5 if !a{4} && !a{5} then a{6} = 0 : goto Gotos if a{4} && !a{5} then a{6} = 1 : a{7} = 0 : goto TO5 if !a{4} && a{5} then a{6} = 1 : a{7} = 1 : goto TO5 if a{4} && a{5} then a{6} = 0 : goto Gotos TO5 a{4} = 0: a{5} = 0: goto DirX Dir6 if a{4} && !a{5} then a{6} = 0 : goto Gotos if a{4} && a{5} then a{6} = 1 : a{7} = 0 : goto TO6 if !a{4} && !a{5} then a{6} = 1 : a{7} = 1 : goto TO6 if !a{4} && a{5} then a{6} = 0 : goto Gotos TO6 a{4} = 1: a{5} = 0: goto DirX Dir7 if a{4} && a{5} then a{6} = 0 : goto Gotos if !a{4} && a{5} then a{6} = 1 : a{7} = 0 : goto TO7 if a{4} && !a{5} then a{6} = 1 : a{7} = 1 : goto TO7 if !a{4} && !a{5} then a{6} = 0 : goto Gotos TO7 a{4} = 1: a{5} = 1: goto DirX Dir8 if !a{4} && a{5} then a{6} = 0 : goto Gotos if !a{4} && !a{5} then a{6} = 1 : a{7} = 0: goto TO8 if a{4} && a{5} then a{6} = 1 : a{7} = 1: goto TO8 if a{4} && !a{5} then a{6} = 0 : goto Gotos TO8 a{4} = 0: a{5} = 1 DirX if player0y>11 && a{6} && a{7} then player0y=player0y-2 if player0y<87 && a{6} && !a{7} then player0y=player0y+2 Gotos So I'm using the variable bits of "a" (it's just a memory address), a{0} and a{1} for the two sensors of horizontal movement, a{2} if movement will be done, a{3} for direction (if 0, +, if 1, -), a{4} and a{5} for vertical sensors, a{6} if movement should be done and a{7} for direction. I read the sensors, load the previous state, compare it and decide if the wheels were rolled, then save the actual sensor states. lda SWCHA lsr lsr lsr lsr and #%11 ldy lastTrack sta lastTrack eor NextTrackTbl,y beq .down eor #%11 bne .endTC .up: ... .down: ... .endTC ... NextTrackTbl .byte %01 .byte %11 .byte %00 .byte %10 Tom sent me this code template, but I only understand half of it. And it's incompatible to what I do.
  8. I even tried the code that is in the temp assembly bB, so I guessed it would work. sta temp7 lda #>(.SetupMouse-1) pha lda #<(.SetupMouse-1) pha lda temp7 pha txa pha ldx #3 ; number of bank you want jmp BS_jsr ; this is at the end of bank8, every jump is going there And it's not working either. :/ And it does not seem like a wrong bank error as that would make strange glitches, but is just simply reboots the system.
  9. Oh my, there is so many things wrong with this. :/ First, I told you, illegal 'nop' is not working with bB. I would do that if I could, I tried NOP $1FF_, NOP $FFF_, even these with STA, LDA, BIT, but none of them works. Second, "CheckMouse" is in bank8 (as the drawscreen loop of bB), it's just the beginning, the real thing is SetupMouse in bank3, and it's more than 1K (it's reading the mouse sensors and takes a lot of space), I can't just copy it into "Checkmouse" (after converting it to assembly, of course) or bank8 will be full and I won't have any space left for sprites. Another thing with bB that every sprite information is in bank8, because it has to be in the same bank as the drawing.
  10. Hi guys, you know, I make a TBS game for the VCS in bB and I have to check the mouse sensors very often. I do it 8 times during overscan and 2 times in vblank now. But there is the "drawscreen" part that is only accessable in assemby, modifing the kernel. I calculated the cycles, so it's not the cause of the problem: First, I do this code where I want to do the checking: lda #8 bit SWCHB BNE .skipping LDA e AND #32 BEQ .skipping JSR CheckMouse This checks if the bw switch is set to 1 and the fifth bit of 'e' variable is set to 1 (it means you are in a loop that allows you using the mouse), and if it's ok, it goes to CheckMouse. Checkmouse looks like this: CheckMouse LDA e ORA #16 STA e LDY #<$1F lDA #>$F6 LDX #2 JMP .SetupMouse .backback rts It's an F4 cartridge, and mouse checking is in the 3rd bank of code. I set the fourth bit of 'e' to 1, so in bB code I will know when to jump back here. So this should jump to label "SetupMouse" in bank3. In bB code I tried a lot of methods, simple "goto backback bank8", the "fake rts" method that was written in Hugg's book (https://8bitworkshop.com/v3.2.0/?=&file=examples%2Fbankswitching&platform=vcs) pha tya pha lda $1FF4,x rts And of course the more logical asm LDY #<$1F lDA #>$FB LDX #7 JMP .backback end But none of them is working, it crashes and starts the ROM from the beginning. Even if I put the ASM under "SetupMouse". There was a version I made with very complicated way in vblank with a lot of jumps and that way, the assembly jump and basic code goto back worked, but the scanline number was too high and if I changed .SetupMouse to anything else, it crashed and as I put a goto for bank4 in vblank and a goto to go back, it crashed as well, so I wanted to find a simple method to fix this, but nothing is working, crashing the game as soon I set bw to 1. Can you tell me how I should do a proper bankswitch is asm? I read about 'illegal' opcodes and 'illegal' nop method for bankswitching, but bB, unlike DASM, can't use them.
  11. 1. Maybe this one can be fixed, but sounds really hard. It would require complete rewrite of the movement, I don't know if I have any free variables for that. 2. It would require cutting down parts of the sprite and yeah, adding one sprite would make bank 8 go to minus. 3. I meant by removing the playfield that there is not a single line of code in the kernel that is about drawing the playfield. I erased it and put there the code for the background (in the multisprite kernel, the background is a fixed color). And you cannot scroll the playfield in the multisprite kernel, because it's mirrored, unlike the standard kernel.
  12. Unfortunately, the TIA was not designed to make music on it, if you open the sound editor in Batari Basic, you will see that it really don't have most of the notes, so it's really hard to make it precise. And of course, the most annoying waveform, the "pure" is the only one that has 1,5 octaves that is precise, the cool Atari "bass" is leaked like a big roll of cheese.
  13. What should I add? I got a suggestion about sky colors, but I had to change the kernel so there is no playfield, but background color rows and those are fixed. I don't have any space left in bank 8 either, maybe 90 bytes, that is not enought for a 3 frame animation. I know that Airwolf had his own game, I played it a lot on the C64, but I was thinking of music that has a connection to helicopters, there was Medicopter 117, but I'm sure only EU people know it, and there's a finnish song by the childmetal band "Hevisaurus", called Hevicopteri, but I couldn't find any readable tabs for it. And most people liked the Airwolf theme becaused they watched it as a child a lot.
  14. After half years, I decided to get this project back with my improved programming skills, I made this night the title screen. I'm pretty sure that the song is familiar to you. I was a big WarCraft and StarCraft fan in my young ages and I really love the strategy game of Don Daglow for the Intellivision, so I decided to make a TBS for the Atari 2600, probably the very first strategy game for the system. At my first attempt, I had problems with the playerscore minikernel and even with the multisprite kernel, but I managed to learn how to use the kernel (even modding it) and of course, I modded the minikernel as well, so, here we go! The game will support Atari ST mouse control if you have one!
  15. I think these will be the final versions of noone would find any errors. ChoplifterNTSC 0.97.bas.bin ChoplifterPAL60 0.97.bas.bin
  16. Wasted 7 hours in assembly. I removed every single PF related stuff from the kernel and added a table based BK drawing, so there is no black border in the game. Unfortunately, this makes the "day to night" idea impossible, because that would turn the grass into some really weird color. The COLUPF is now free, so I could make the tank's ball white.
  17. There is no playfield, but background graphics. 7 hours wasted for assembly.
  18. I changed the kernel last night, it took me 6 hours. I removed every part that contained PF and replaced it with a table of color rows, so now there is no background border around.
  19. I just wondered, I have seen a code that can make the background multi colored in ms kernel. Is there any trick to make the pf colored? (for example, make a black frame around, but have green grass at the bottom?
  20. I would say game is near to be finished, hope the bugs won't appear (sometimes the sound is not the best and the counter for extra life is a bit off). I checked for days, there shouldn't be any scanline issues. So, as I mentioned, you get an extra life for every 1000 points. At the beginning, it's really easy to get! I added two enemies, one of them is from the original game, the airplane, fast and annyoing, you get a lot of points for killing it, because it's nearly impossible. The other one is from Defender, the alien is after the people you saved and grabs one. You can save the poor thing if you shoot down the alien and get him in air! ChoplifterNTSC 0.94.bas.bin
  21. Reminds me as I programmed my first game, simple concept with a lot of different rooms. I absolutely love it, especially the seaweed/tentacle part!
  22. rem batari Basic Program rem created 2018.10.05. 20:28:39 by Visual bB Version 1.0.0.568 set romsize=4k set tv = ntsc player0x=70: player0y=60 Arrow player0: %000110 %101110 %111100 %111111 %111110 %111100 %111000 %110000 %100000 end if player0x<15 then player0x=15 if player0x>138 then player0x=138 if player0y<10 then player0y=10 if player0y>88 then player0y=88 SSSS if !joy0up && !joy0down then goto Dir1 if joy0up && !joy0down then goto Dir2 if joy0up && joy0down then goto Dir3 if !joy0up && joy0down then goto Dir4 Dir1 if !a{0} && !a{1} then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir if a{0} && !a{1} then a{0} = 0: a{1} = 0: a{2} = 1 : a{3} = 0 : goto Dir if !a{0} && a{1} then a{0} = 0: a{1} = 0: a{2} = 1 : a{3} = 1 : goto Dir if a{0} && a{1} then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir Dir2 if a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir if a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : a{3} = 0 : goto Dir if !a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : a{3} = 1 : goto Dir if !a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir Dir3 if a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir if !a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : a{3} = 0 : goto Dir if a{0} && !a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : a{3} = 1 : goto Dir if !a{0} && !a{1} then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir Dir4 if !a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir if !a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : a{3} = 0 : goto Dir if a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : a{3} = 1 : goto Dir if a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir Dir if player0x>16 && a{2} && a{3} then player0x=player0x-2 if player0x<137 && a{2} && !a{3} then player0x=player0x+2 if !joy0left && !joy0right then goto Dir5 if joy0left && !joy0right then goto Dir6 if joy0left && joy0right then goto Dir7 if !joy0left && joy0right then goto Dir8 Dir5 if !a{4} && !a{5} then a{4} = 0: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX if a{4} && !a{5} then a{4} = 0: a{5} = 0: a{6} = 1 : a{7} = 0 : goto DirX if !a{4} && a{5} then a{4} = 0: a{5} = 0: a{6} = 1 : a{7} = 1 : goto DirX if a{4} && a{5} then a{4} = 0: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX Dir6 if a{4} && !a{5} then a{4} = 1: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX if a{4} && a{5} then a{4} = 1: a{5} = 0: a{6} = 1 : a{7} = 0 : goto DirX if !a{4} && !a{5} then a{4} = 1: a{5} = 0: a{6} = 1 : a{7} = 1 : goto DirX if !a{4} && a{5} then a{4} = 1: a{5} = 0: a{6} = 0 : a{7} = 0 : goto DirX Dir7 if a{4} && a{5} then a{4} = 1: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX if !a{4} && a{5} then a{4} = 1: a{5} = 1: a{6} = 1 : a{7} = 0 : goto DirX if a{4} && !a{5} then a{4} = 1: a{5} = 1: a{6} = 1 : a{7} = 1 : goto DirX if !a{4} && !a{5} then a{4} = 1: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX Dir8 if !a{4} && a{5} then a{4} = 0: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX if !a{4} && !a{5} then a{4} = 0: a{5} = 1: a{6} = 1 : a{7} = 0 : goto DirX if a{4} && a{5} then a{4} = 0: a{5} = 1: a{6} = 1 : a{7} = 1 : goto DirX if a{4} && !a{5} then a{4} = 0: a{5} = 1: a{6} = 0 : a{7} = 0 : goto DirX DirX if player0y>11 && a{6} && a{7} then player0y=player0y-2 if player0y<87 && a{6} && !a{7} then player0y=player0y+2 if joy0fire then COLUBK=$1e: COLUP0=$00 else COLUBK=$80: COLUP0=$0e if b{0} then return PF0=%11111111 b{0} =1 drawscreen b{0} =0 goto Arrow vblank goto SSSS Okay, I scan the mouse in vblank as well, now it's a lot better! The only problem I can't do it during drawscreen without hacking the kernel assembly.
  23. Hi guys. I just realized this week that you can use the ST Mouse with the VCS and I was amazed, so I got one and started coded (I use bB). I disassembled the mouse, so I could figure out how it determinates movement of the ball. So the joy0up and joy0down are the horizontal way of movement, so let's take the example. I understand that there is a rotation, for one way, it's 00 >> 01 >> 11 >>10 and 00 >> 10 >> 11 >> 01 for the other direction. So I made my code: if !joy0up && !joy0down && !a{0} && !a{1} then a{0} = 0: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir if !joy0up && !joy0down && a{0} && !a{1} then a{0} = 0: a{1} = 0: a{2} = 1 : goto Dir if !joy0up && !joy0down && !a{0} && a{1} then a{0} = 0: a{1} = 0: a{3} = 1 : goto Dir if joy0up && !joy0down && a{0} && !a{1} then a{0} = 1: a{1} = 0: a{2} = 0 : a{3} = 0 : goto Dir if joy0up && !joy0down && a{0} && a{1} then a{0} = 1: a{1} = 0: a{2} = 1 : goto Dir if joy0up && !joy0down && !a{0} && !a{1} then a{0} = 1: a{1} = 0: a{3} = 1 : goto Dir if joy0up && joy0down && a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir if joy0up && joy0down && !a{0} && a{1} then a{0} = 1: a{1} = 1: a{2} = 1 : goto Dir if joy0up && joy0down && a{0} && !a{1} then a{0} = 1: a{1} = 1: a{3} = 1 : goto Dir if !joy0up && joy0down && !a{0} && a{1} then a{0} = 0: a{1} = 1: a{2} = 0 : a{3} = 0 : goto Dir if !joy0up && joy0down && !a{0} && !a{1} then a{0} = 0: a{1} = 1: a{2} = 1 : goto Dir if !joy0up && joy0down && a{0} && a{1} then a{0} = 0: a{1} = 1: a{3} = 1 : goto Dir Dir if player0x>15 && a{3} then player0x=player0x-1 if player0x<138 && a{2} then player0x=player0x+1 So joy0up sets a{0} and joy0down set a{1}, if it's the same as it was in the previous turn, there is no movement, if it's changed, depending on that rotation, the cursor have to move. I would do the same with the vertical movement. This could work, but it only does if you are really careful with moving the mouse, else, it nudges back and forth. Can you tell we what I should change?
×
×
  • Create New...