Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by AndyMt

  1. I'm seriously considering planning this! Right now both my games use slightly different variants of a lib for sprite handling and music - due to "historical reasons" and lessons learned. I want to migrate both to the same code base. Then I think it would be time to release it to the public.
  2. Yes, that's something I was looking at, too. And in the comments there were some references to the X16, so who knows...
  3. Thank you very much! I'm thrilled to see my games made it into the top spots . I took inspiration from "Chase Vault" when I started this, so thank you very much that you shared the code on GitHub. I'm still too embarrassed on my code quality, but I promise to share my repos when I've finally managed to clean up the mess. Both games were written mostly in C, but some parts in assembler, like the IRQ based soundfx and music player. To my surprise sprite/collision handling, controller and gameplay coding is possible in C, even though CC65 doesn't really optimize. Of course as you mentioned, it is important to be aware what the compiler will do with the code. So in my brain there is a "compiler" running in parallel while coding, to avoid performance issues. I'm sure on a C64 with it's 1MHz CPU this would have been impossible.
  4. I had the same question here: I settled into detecting which ROM version is present, here are the details:
  5. Almost certainly, as the controllers were moved from VIA#2 to VIA#1. I haven't looked into this at all as I don't have a game controller to test this with. Keyboard emulation works in the emu, though, I don't know how that's done.
  6. During the last few days I've spent a lot of time debugging my software in the emulator, running from an SD card (VHD file). This is because some things in the emulator behave differently when loading stuff from SD card instead of the host file system. Anyway: in Windows I found it quite fiddly to update the SD card VHD file for every debug cycle, so I came up with a solution to do speed things up. After a cc65 build I now only have to run a single cmd file which even puts the LOAD"MYPROGRAM.PRG" and "RUN" into the clipboard. Now I just have to press CTRL+V and the PRG is loaded and started. Prerequisites: VHD Attach tool (OSFMount wasn't flexible enough for this, but maybe someone else figures it out) an SD card VHD image (this is the one from the X16 github repo) X16-emulator install directory is added to the system PATH environment variable VHD Attach install directory is added to the system PATH environment variable compiled PRG and BIN files of your software are to be found in the "out" subdirectory Preparations: attach (aka mount) the vhd file once by right clicking and selecting "attach" note the drive letter which is assigned (in my case X:, it will stay the same) put a first set of your files into the VHD detach the VHD file (right click) Now create a batch or cmd file which does the following: attach the VHD file wait 2 seconds copy PRG and BIN files to the assigned drive letter wait 2 seconds detach the VHD file (so the emulator can use it) put the load command into the clipboard run emulator Here is a sample .cmd file I've used: VhdAttach.exe /attach test.vhd ping -n 2 > nul copy out\*.PRG X:\ copy out\*.BIN X:\ VhdAttach.exe /detach test.vhd ping -n 2 > nul (echo LOAD"INVADERZ.PRG",8 && echo RUN) | clip x16emu.exe -sdcard test.vhd -scale 2 -keymap de-ch Replace "test.vhd" with the filename of your VHD file, the PRG name with yours and also select the correct keymap parameter (or remove it). This saved me a lot of time, maybe it helps others, too.
  7. I've updated my Repo so now waitvsync() uses RDTIM instead of the TIMER memory address. This makes it compatible with more ROM versions, but also a bit slower. I'll change this back as soon as the TIMER address has settled. My cc65 repository: https://github.com/AndyMt/cc65
  8. Do you happen to have a Windows build of the latest r39? I could not get this to compile, I have neither Mac nor Linux machine.
  9. Thanks - maybe I should use the Kernal function to get the timer value for the moment. Even though that's less efficient.
  10. The PRG format is just about loading a program into memory. Loading other things into VERA memory or banked RAM is independent of how the program got into memory. This happens by using the KERNALs API and for example loading BIN files into any memory type. A PRG can optionally contain a small amount of graphics data which then has to be copied into VERA by the program itself.
  11. I branched the cc65 repo and started changing the cx16 lib. It now works with Invaderz and Brixx and both would now run on R39. In case anyone wants to check it out: https://github.com/AndyMt/cc65 I'll do some more testing myself before creating a pull request.
  12. I've now created a test version running on R39 and maybe (?) on real proto #2 hardware. I won't put this in the download section, but if anyone wants to try, I attach the file here. Not sure if this works on a SD card, I just load from device 8. @Michael Steil: I understand you have one of the few existing boards. So just in case you find the time, maybe you can test the attached file ? INVADERZ R39.ZIP
  13. Added a Kernal/ROM version check. Will only run on R38, as well as on custom ROMs on your own risk. This is in preparation for the upcoming R39 on which the current game won't work.
  14. Added a Kernal/ROM version check. Will only run on R37 and R38, as well as on custom ROMs on your own risk. This is in preparation for the upcoming R39 on which the current game won't work.
  15. Turns out I have to wait for an updated version of cc65 and it's cx16 libs. I tried hard to compile it myself and then fix the .inc and .h files - but failed. Anyone working on this? I can support by updating all the VERA and VIA addresses etc. in the asminc and include files.
  16. Yes, I thought about this. I actually know what's supposed to be in some of the banks, so I could just do the check without modifying anything.
  17. Super, thanks! It's anyway just needed for a few weeks until the official release and the web-emulator are updated. So I will just assume a custom ROM is indicating the latest ROM and board revision. And maybe the releases happen before I have updated my stuff anyway .
  18. Ok, if I see this correctly, right now in the emulator looking at $FF80 shows -38, which means ROM version equals emulator version? Using the one posted further up (upcoming R39?) gets me $FF, so it's a custom ROM, but presumably will be -39 once the emulator and ROM is released? It occurs to me, that what I actually need is to detect the board revision - so I know which RAM banking address to use and all the other hardware memory mappings.
  19. I'm in the process of updating Brixx and Invaderz to the new emulator and ROM. I want them to be compatible with R38 and R39 - but how can I detect which version the PRG is running? I know I can detect if I'm running in the emulator: read $9FBE/$9FBF, must read 0x31 and 0x36 This doesn't seem to be the version, just an indicator that the software is running on the emulator. Is there an official way to detect ROM/emulator version? I found different solutions, but none seemed officially supportet. Like reading $FF80 or $FFFA etc. What's the best approach there?
  20. I do this in "Invaderz" and "Brixx" by changing the palette. Of course this changes the entire screen, on all layers, including sprites.
  21. Isn't it nice that the restrictions the X16 architecture imposes leads to unexpected solutions ?
  22. I'm actually not sure, I chose 3 As Matt already wrote: the LFN doesn't matter. The load address does. But "save" is not possible with the host file system and with the SD card neither does in the emulator. Oh - and the files you load need to have the 2 byte header with the target address in, or just 0x0000.
  23. I can give you a code snipped written in CC65: uint32_t loadMusic(char* fileName, uint8_t device, uint8_t bank) { uint16_t addr = 0xa000; uint32_t totalRead = 0; uint8_t lfn = 3; setHighBank(bank); // Use cc65 kernal wrappers directly cbm_k_setlfs(lfn,device,0); cbm_k_setnam(fileName); totalRead = cbm_k_load(0,addr) - addr; if (!totalRead) { ScreenRestore(); printf("BRIXX: Error loading music for [%s]", fileName); exit(0); } return totalRead; } The music files I load in Invaderz or Brixx are around 40 to 80 kBytes. And are loaded totally fine, starting with the active high-bank, wrapping into the following banks seamlessly.
  24. Do you already have a VGM parser then? Right now I'm using SteveC's vgmcleaner in his music-player: https://github.com/StewBC/music-player This is somewhat half-way towards a VGM parser/player.
  25. Oh sorry, I missed that point. And I'd be interested in loading VGZ, too. Right now I'm loading uncompressed VGM files for music.
  • Create New...

Important Information

Please review our Terms of Use