Jump to content

Elektron72

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

14 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. cc65 should work. A few recent updates have added support for the X16.
  2. Yes. Any variables or subroutines that need to be used in multiple files must be exported in one, and imported in another. Most of my assembly source files have a large amount of .import statements at the top.
  3. I believe the best way to account for the KERNAL variables is to create two seperate memory areas, with two corresponding segments. The linker should warn you when one of the segments becomes too large. I would be careful using the virtual register area for zero page variables, as some of these (specifically r11-r15) are marked as a scratch area for KERNAL calls. If you add "type = zp" when you define a zeropage memory segment, the compiler should not try to write the code to a file. However, the empty file definition on the zeropage memory area should already stop it from outputting code. I believe LOADADDR and HEADER are only automatically imported if you are using the C compiler, so you should fill them with the load address and the BASIC loader in your main source file. cc65 is primarily designed to link multiple source files into one executable, instead of converting multiple source files into multiple loadable modules. Additionally, the Commander X16 does not perform any relocation when it loads code into memory, so the modules would need to be loaded into the same area of memory every time. It is much easier to load and unload data, because it does not rely on being loaded at a specific address to function. I would link all of the code into one executable, and load the data from BIN files when it is needed. If you want to create loadable code modules, there may be a way in the cc65 documentation (most of the documentation pertaining to linking and segments is under the ld65 section). I am assuming that according to the information given above, GAME2.BIN would contain model data. If models.s does not contain any code or references to labels, then it should not matter what address the assembler believes the data is located at. Simply compile it into a file named GAME2.BIN. I have never tried to create multiple code modules or loading code into banked memory. The KERNAL uses multiple cfg files to manage the complexity of splitting the code across multiple memory banks. It appears that creating multiple modules and loading code into banked memory, although possible, is very difficult. Therefore, I would recommend keeping all code in one PRG file as much as possible. If you need to have your program in multiple files, there may be other people who know how to do this. Good luck with your program!
  4. According to the current documentation, the VERA does contain a PCM playback system.
  5. There is a vector located at $0314 that points to the interrupt routine (which is by default called at vertical blank every frame). Changing this vector to point to your own code will allow you to write a routine that runs at vertical blank. To make sure the original interrupt routine still runs, save the original value of the vector, and jump there at the end of your routine.
  6. The 6502 (and 65c02) only have 8 bit add and subtract. The carry flag has to be used to perform operations on any larger values, and multiplication/division must be done with loops and bit shifts.
  7. If you want to use the kernal routines, I believe that the most efficient way to do it using the routines currently implemented is using PLOT and CHROUT. To change colors using these routines, output the color control characters listed in the Programmer's Reference Guide. However, the fastest way to do it would most likely be by directly accessing the VERA registers. The default layout of screen memory allocates 256 bytes for each row, meaning that to access a specific X and Y, the high byte of the address is the Y, and the low byte is X*2 (which is easy to calculate using ASL). Even numbered bytes store character codes, and odd numbered bytes store color data. In 16-color mode, the lower 4 bits of each color byte store the foreground color, and the upper 4 bits store the background color.
  8. Is the clock frequency of the YM2151 in the Commander X16 3.579545 MHz or 4 MHz?
  9. Elektron72

    MineX16

    Version 1.0.1

    47 downloads

    This is a minesweeper clone for the Commander X16. It allows custom minefield sizes up to 38x24, with almost any amount of mines. To start, load and run MINEX16.PRG. Controls: Main Game Left click to reveal a tile Right click to flag a tile Click on the face to reset Press space to open the configuration screen (will reset the minefield) To exit, reset the machine (Ctrl-R on the emulator) Configuration Space to open and close Use the + and - buttons next to each digit to change the width, height, and number of mines Numbers are capped to a specific range; attempting to select an invalid value will set the number to its maximum or minimum value Click any of the presets to set all of the numbers at once Note: The game uses kernal functions to handle the mouse, so any weirdness is most likely caused by the emulator.
  10. MineX16 View File This is a minesweeper clone for the Commander X16. It allows custom minefield sizes up to 38x24, with almost any amount of mines. To start, load and run MINEX16.PRG. Controls: Main Game Left click to reveal a tile Right click to flag a tile Click on the face to reset Press space to open the configuration screen (will reset the minefield) To exit, reset the machine (Ctrl-R on the emulator) Configuration Space to open and close Use the + and - buttons next to each digit to change the width, height, and number of mines Numbers are capped to a specific range; attempting to select an invalid value will set the number to its maximum or minimum value Click any of the presets to set all of the numbers at once Note: The game uses kernal functions to handle the mouse, so any weirdness is most likely caused by the emulator. Submitter Elektron72 Submitted 08/19/20 Category Games  
×
×
  • Create New...

Important Information

Please review our Terms of Use