Jump to content

Gemintronic

+AtariAge Subscriber
  • Content Count

    9,937
  • Joined

  • Last visited

  • Days Won

    35

Posts posted by Gemintronic


  1. 3 hours ago, KevKelley said:

    First off, I want to say how much I love this. I finally got a chance to play around with this and had a lot of fun doodling, importing pictures, and editing.

     

    I did have a problem and was not sure if I was doing something correctly or not. When I export the .bas and assembly files and run them with no editing, it does not seem to work. Gmthe screen would be black and running at around 300 cycles until I got a button to get to the Hello World playfield. I am assuming I probably missed a step somewhere. I tried fiddling with the code but was at a loss (but I had a couple crazy kids running around so my focus probably was not 100%!)

     

    Also, thought I'd share the image I had created for my game I was working on. Despite not getting it to work, it was extremely enjoyable just as a fun little image editor.

     

     

    Got it to work.  Feel free to use it however you please :)

     

    Not sure if it was Firefox or some ad blocking extension messing with it, but, sometimes it would change the foreground or background color even whenever I clicked outside the drawing area.  Say, trying to select an option or change a color.

     

    linemantitle.png

    linemantitle.zip


  2. Unpopular opinion but I opted to buy a pre-built MiSTer.   Too many vendors with too many things to ship - most out of stock on one part or another.  Plus, I didn't want to risk fugging it up.

     

    No regrets.  I enjoy the few 7800 games that work with the currently available core on my Xbox One joystick.

    • Like 1

  3. I think bB needs some additional files tweaked for Genesis button support.

     

    have you tried pairing down the logic by making the changes outlined here and compiling RevEngs example?

    https://atariage.com/forums/topic/158596-2-button-games-in-bb-using-sega-genesis-pads-with-the-2600/

     

    Maybe after that changing the example to use your kernel options and trying again. Just to see if it stops working as intended.

     

    Not trying to sound huffy muffy.  Just thinking about what I'd do to figure it out :)

     

    • Like 1

  4. Lurking (as usual) and trying to follow both the question and the answer. 

     

    I realize I can't find the font CyranoJ posted above.  Did a search on pictures in the JagStudio folder.  Also tried to find a reference in print.bas figuring it'd load it in somewhere.

     

    Where is this beautiful ASCII character set?

     

    UPDATE:  Made a version myself.  Probably needs tweaking for real use.

    tosfont.png

    • Thanks 1

  5. My big hare brained scheme is to figure out if a machine is running on PAL or NTSC.

     

    Thought of comparing the difference between two different counters: one running in vblank and one in the main loop. 


  6. It also turns out using bits from a variable is a boolean (true/false) kinda thing.  That's why you see bitwise operations look like this:


     

    rem //** Declare var to later use as 8 true/false values **//
    
     maryostate = c
    
    
    rem //** Define first bit in maryostate as hasfireflower for easy reading by the coder **//
    
     def hasfireflower = maryostate{0}
    
    
    rem //** Put a 1 or 0 into hasfireflower **//
    
    if collision(player0, ball) then maryostate{0} = 1
    
    
    rem //** don't need to write it as "hasfireflower = 1" because it's going to be 1 (true) or false (0) anyway.
    
    if hasfireflower then goto firejoyevent

     


  7. 6 minutes ago, Lewis2907 said:

    Gemintronic,

     

    Thanks. I see some ASM in the code. I probably need to learn that or find a book on it. I will try it out tonight.

     

    Not sure where I included inline assembly.  Maybe your'e talking about the unexplained counter{0} thing?

     

    The counter variable goes up by one every main loop.  That means the first binary place always flips from 0 to 1 and back again.  That makes it perfect to trigger things every other frame.

     

    counter{0} means the value in the first binary place 0000000x

    counter{1} means the value in the second binary place 000000x0

     

    ..and so on :)


  8. Not the best code but maybe this'll demonstrate gosub-less techniques

     

    
     rem //** counter counts up once every iteration of the main loop **//
     rem //** redghostdir holds the current direction the red ghost wants to go in **//
    
     dim counter = a
     dim redghostdir = b
    
     rem //** load up player graphics **//
    
     player0:
     %10010101
     %11111111
     %11100111
     %11000011
     %11111111
     %01011010
     %10111101
     %00000001
    end
    
     player1:
     %01111110
     %11100011
     %11000001
     %11000001
     %11111111
     %11011011
     %11001001
     %01111110
    end
    
     rem //** set player locations on screen **//
    
     player0x = 44 : player0y = 44
    
     player1x = 66 : player1y = 66
    
    
    main
    
     rem //** Do loop maintenance including updating counter and dealing with reset requests **//
    
     if switchreset then reboot
     counter = counter + 1
    
     rem //** Handle player joystick input **//
    
    joyevent
     if joy0up then player1y = player1y - 1
     if joy0down then player1y = player1y + 1
     if joy0left then player1x = player1x - 1
     if joy0right then player1x = player1x + 1
    
     rem //** Put player in ghost trigger position for testing **//
    
     if joy0fire then player1y = 72 : player1x = 85
    
     rem //** Instead of moving by a fraction (.5) just call movement event every other frame **//
    
     if counter{0} goto aicontrolsroom0
    
    after_aicontrolsroom0
    
     rem //** set up colors and things for drawscreen **//
    
     COLUP0 = $0E
     COLUP1 = $2E
    
     drawscreen
    
     goto main
    
    
    aicontrolsroom0
    
     rem //** if player is in trigger Y position clear out redghostdir else exit **//
      
     if player1y = 72 then redghostdir = 0 else goto after_aicontrolsroom0
    
     rem //** Check for X coordinate triggers and exit if no go **//
        
     if player1x = 28 then goto moveghost  
     if player1x = 85 then goto moveghost 
     if player1x = 141 then goto moveghost
    
     goto after_aicontrolsroom0
    
    moveghost
    
     rem //** set redghostdir to random 0-3 value and jump to appropriate code **//
    
     redghostdir = rand&3
     on redghostdir goto red_up red_down red_left red_right 
    
     rem //** This section moves red ghost coordinate by 1 but note this only gets called every other frame **//
    
    red_up
     player0y = player0y - 1
     goto after_aicontrolsroom0
    
    red_down
     player0y = player0y + 1
     goto after_aicontrolsroom0
    
    red_left
     player0x = player0x - 1
     goto after_aicontrolsroom0
    
    red_right
     player0x = player0x + 1
     goto after_aicontrolsroom0

     

    pacexample.bas


  9. Yeah, I've learned to not use gosubs.  Or, at least use them outside the main loop if possible.  Had a game called M.M.S.B.C. 2 that eventually rolled the screen due to gosub usage.

     

    Instead, I use a lot of "sub" labels with things like "after_"


     

    main
    
     if debounce > 0 then goto after_joystick else debounce = debounce - 1
    
    
    joystick
    
     if joy0fire then missile0y = missile0y + 1
    
    
    after_joystick

     


  10. On 3/22/2021 at 5:43 PM, freshbrood said:

    March 2021, Win10 64bit, latest windows update- currently only bbasic 32bit works for me. (64bit version would close immediately) 

     

    No settings/paths are saved, but it edits compiles and saves. Just an fyi. 

     

    There are only weird techie voodoo solutions left and even those are trial and error.

     

    Like I said in a previous thread we might have to break down and learn how to set up a virtual Windows 7 machine via Virtualbox.  it's free.

    https://www.virtualbox.org/

     

    It also has a seamless mode that makes VisualbB look like any normal application even though it's running on a VisualbB friendly virtual machine running Win 7.

     

    Either that or use Visual Studio Code with Atari Dev Studio.  Keep the half working older copy of VisualbB open for the extra tools Atari Dev Studio doesn't yet have.

     

    The last, LAST option is to track down the developer of VisualbB and beg him to re-compile VisualbB for modern Windows and .NET.  I think he's long gone, though.

     


  11. I'd take out the fancy decimal point math   "   _P0_L_R = _P0_L_R + .2"

     

    and using variables this way too:  "   dim _P0_L_R = player0x.a"

     

    For me it's much more stable to use the modulus operator to do things every so many frames.

     

    Here is some code that slows the character down by moving him every 4th frame using "counter&3"

     

    main
     if switchreset then reboot
     counter = counter + 1
    
     if counter&3 > 0 then goto after_input
    
    input
     if joy0left then  player4x = player4x - 1
     if joy0right then player4x = player4x + 1
     if joy0up then    player4y = player4y + 1
     if joy0down then  player4y = player4y - 1
    
    after_input

     

    This technique may not directly solve your problem.  Maybe it will.  But, the code will be easier to read using less complicated variables and math - leading to better tracking down where the ghosts get displaced.  Also realize bB programmers have no control over the flicker mitigation technique.  So, the ghosts may be told not to draw by the bB flicker mitigation routines.  I'd start their Y coordinates separate from eachother on screen.  In my experience virtual sprites need around three pixels worth of padding between them (i.e. 3 pixels below or above displayed part of sprite).

     

    • Like 1
×
×
  • Create New...