Jump to content

VincentF

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    2

Files posted by VincentF

  1. Vixx

    The project : https://github.com/VincentFoulon80/vixx
    Vixx: A bullet-hell game for the X16
    Story:
    Your Commander X16 got a virus ! Thankfully you have an antivirus called Vix that'll get rid of the evil software. You play as the Vix Antivirus, scanning the computer trying to locate and destroy the virus.
     
    How to play :
    Joystick / Arrow keys : move the player
    Start / Enter : start the game, pause
    B button / Ctrl key : Panic!
    Your score increase over time, and also when you move near the bullets.
    You score points when defeating bosses and also when panicking ( 100 points per bullets on panics)
     
    Project status :
    The game is still in its alpha phase. I'm implementing new features and do not focus on the content.
    The first level is not final, and the second is just an infinite loop. It's more to give an idea of how the game will look.
     
    Devlog :
     

    89 downloads

       (1 review)

    Updated

  2. File Loader Tutorial

    Introduction
    Here is a little demo of how to dynamically load files in RAM bank in assembly.
    It's very simple to do but I think that it can be helpful for someone who don't know how to do this right away. In fact I personally would love to see more of this kind of programs in the download section 🙂
    How this loader works ?
    First thing to do is to tell the Kernal that we want to use a logical file. For this we need to use the SETLFS subroutine.
    From the "C64 Programmer Reference Guide" :
    Since we want to load from the disk (or filesystem) we'll need to use the device number 8. The logical file is not important so we use the file 0.
    Also, as we want to relocate the program into a bank at $A000, we'll set the Y register to #0 to activate secondary address mode.
    Next step is telling the Kernal which file we want to load. For this we'll use the SETNAME subroutine.
    From the "C64 Programmer Reference Guide" :
    For this we'll need to store our file names somewhere in our program so we write at the bottom of our file the names as a string of petscii characters. We then prepare our registers with the size of the filename to load, and then the address.
    Our final step to load a file is obviously the LOAD subroutine.
    From the "C64 Programmer Reference Guide" :
    As the Reference guide said, we want to load a file so we set our A register to 0 and since we want to load to banked RAM ($A000) we enter the address in our X and Y registers.
    One last thing that we need to do just after each of our LOAD calls, is to verify that our file has been successfully loaded. For this, we'll need to use the READST subroutine.
    From the "C64 Programmer Reference Guide" :
    As usual, following the Reference guide, all we need to do is call this subroutine just after our LOAD call, and check the content of the Accumulator. If zero, the load was successful.
    And that's all ! You can chain file loading as much as you need, and even you just need to call SETLFS once at the start of the chain.
    Note that you'll need to switch the bank between file loads to prevent overwriting previously added program. And since Bank 0 is also reserved you'll need to first switch to bank 1 and start from here.
    At the end you can also load a file in place of the loader, just avoid overwriting memory where the code is currently being executed. You can for example leave this kind of code in your first bank and at last run it to load a program from $0800 to $9EFF.
    Kernal Subroutines full documentation : https://www.pagetable.com/c64ref/kernal/
    Post Scriptum
    If you have any suggestions for the code or even want to change things in this description, don't hesitate to tell me !

    102 downloads

       (1 review)

    0 comments

    Updated

×
×
  • Create New...

Important Information

Please review our Terms of Use