Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by borgar

  1. Sure, feel free to use for showcasing. I did rewrite this part as desertfish mentioned. And a few other things as well. But this is now built for the later versions of the emulator and since the "Try it now" function isn't update yet I've kept delaying updating the X16 game page etc. I'll just add the latest version here for convenience. I more or less thought I was done with this when I was at the version that is on the X16 game page but I keep tinkering with it every now and then. Updates since the .5 version includes More enemies and a new bomb type More levels Higscore tracking (though this sort of a temporary solution at the moment) Lots of code optimizations to improve C64 version (which isn't really relevant here) And generally trying to make the code better organized petaxian.prg
  2. Ah, yes. The description hasn't been updated for a while. I took this as a gentle reminder and have done so now. The text should better reflects the current state of the project. I'll update the game in the CX16 pages when it can work with the latest emulator.
  3. No, I'm not experiencing noticable slowdown on C64. The last update really helped a lot here. I've just commited some updates with a couple of more enemies, more stages and a new bomb types now so the games should hopefully be more challenging as well. I got some comments that it was a bit easy At least I have not been able to complete the game myself yet after the update.
  4. I didn't get around to checking out the new compiler before now but there is a marked improvement in Petaxian when all enemies are on screen and moving with the latest update. I definitly use a lot of logical expresion and tons of array indexing so assume the above update is why Very very nice.
  5. Keyboard isn't as good as a controller that is true. And I may have played the game a few times more than you for some reason . And well spotted, it's a D&D sheet. Though this was printed for my son and not myself. I haven't been able to inspire my son to take up computers and programming, but I did manage get him into D&D.
  6. I've had my old C64, 1741 floppydrive and an old Samsung "portable" TV in the attick so to speak for, well something like 30 to 35 years. During the the Corona period I dragged this out and tested and unfortunately my C64 didn't work anymore. Got the Light Blue/Blue screen without any text so I guess it could one of the ROMs that are bad. However, I did get hold of another C64 a few years ago that I hadn't tested yet. I found out the old power supplies where untrustworthy so I didn't want to risk anything and it took me a while to get around to order a new. Well, now I have new powerbrick (ordered from here : https://www.c64psu.com/c64psu/43-1488-commodore-64-c64-psu-power-supply.html) and the other C64 works without any trouble so far. Even the 1741 workes fine. At least 4 of the 5 old floppies (with hrm, "backups") works. I still didn't have any way to get the game over to the C64 but after looking a bit only I ended up with a TapeCartSD solution (cheap, easy to use for non-disk images like prg files). So today I tested Petaxian on real hardware for the first time. I may have to make the game a bit harder since I beat this on first try even with the terrible joystic (none of the decent joystic I bought back then lasted very long as far as I remember). The screen quality of the TV wasn't great when it was new, and has probably not gotten any better in the last 35 years and the antenna output is pretty bad as well. I actually tested with a monitor I have that takes just about anything as input (including from antenna) and the picture quality was actually worse than the one in the CRT. I'll just have to order C64 to SCART plug. Those are pretty cheap.
  7. It's so nice to see so much regular progress for Prog8. BTW, I first encountered a language with "piping" syntax during my university days. That was in the BETA programming language (https://en.wikipedia.org/wiki/BETA_(programming_language)). There is looked like this (* x = 1 *) 1 -> x ; (* x = f(1) *) 1 -> f -> x ; (* res = fibonacci(1,5) *) (1,5) -> fibonacci -> res; Multiple parameters was supported and "safe" so that (x, y) -> (y, x) did a "swap". This syntax is a lot easier read for long functions chains but I have to admit that I never got 100% comfortable with this syntax style. I guess the traditional Algol syntax was already firmly embedded in my skull by the time I encountered BETA.
  8. I started out using Emacs in plain text mode which worked well enough for me. Though I have mainly switched to Visual Studio Code with Adam Kubiczek's syntax highlighting (https://github.com/akubiczek/Prog8-TmLanguage-VsCode) now. Generally, I prefer fairly basic editors over IDE's and it turns out VSC does the lightweight IDE well.
  9. Sure. I use this on WIndows 7 (old stationary pc) and Windows 10 (laptop). Never had any problems getting this to work. BTW, I have just set up a few small bat scripts to compile and/or run stuff. This on I use just to build the Petaxian code, I have variants that can take program name as argument, build for C64 instead for XC16 etc. SET PATH=%PATH%;.. SET jar=..\prog8compiler-7.5-all.jar IF %computername%==BIFROST ( SET javap="C:\Program Files\OpenJDK\jdk-\bin\java.exe" ) ELSE ( SET javap="C:\Program Files\OpenJDK\jdk-\bin\java.exe" ) %javap% -jar %jar% -srcdirs cx16 -target cx16 petaxian.p8 ..\cmdrx16v38\x16emu.exe -joy1 SNES -run -prg petaxian.prg
  10. Very nice. My only currently working project (https://www.commanderx16.com/forum/index.php?/files/file/182-petaxian/) still compiles and run fine though there is no reason to rebuild and upload yet. I have made the Git project public (https://github.com/cyborgar/Petaxian) in case anyone want to look at a bit larger Prog8 code example compared to the mostly smaller examples coming with the compiler. I have organized code in multiple files/modules. Though there is no code protection this does require explicit references when crossing modules and that helps a lot with visibility. I have (slowly) started on another clone game (this one is going to copy liberally from Llamasoft's Gridrunner) but I've just gotten started. I'm going to focus on getting it to work on C64 before I'll probably port it to CX16.
  11. Ah, a fellow visitor to Skara Brae. I also played the original on C64 and bought the remasters. I never played the second or third game on C64 and haven't gotten started on those in the remaster either. I have fond memories of playing this (with a suitable stack of gridpaper), though I have to admit that without the new automapper in the remaster I would never consider replaying these today.
  12. Right now I'm fine with 1. I'm basically not going to require the new functionality in the near future so the new compiler work with the old emulator for me.
  13. After the initial burst of work on this game to a reasonable looking state, things have as expected slowed down. Only a few things added this time Changed game over to defeat/victory with score "calculation" (bonus points for any lives at end of game) Some enemies have a chance to drop seeker bombs (slower bombs that move toward player) Made credits more like other info pages
  14. Yes indeed. I have tested this and had no problems importing and drawing a screen from binary input. Many thanks.
  15. Using the namespace prefix gives me .\screen_test.asm:57:9: error: not defined ident '_main' lda #<_main.rawdata ^ .\screen_test.asm:43:1: note: searched in this object only
  16. I have upgraded to BETA2 and Petaxian runs fine I can now use the Prog8 const from my assembly which is excellent. However, I'm still struggling with figuring out how to import raw data. I.e. I want to add full screen char data either as binary or as asm code. AND access this from Prog8. All I basically need is a way to figure out the address to the first byte of this data. Right now I can not e.g. see any way that %asmbinary is even useful. You mentioned using a lable but I can't get this to work. This might not be a bad idea to add an example for this btw. In any case I'm trying something like this: main { rawdata: %asmbinary "data.bin" sub start() { uword charPtr = &rawdata charPtr++ ; Only to prevent removal of variable during compile } } but get the following error .\screen_test.asm:57:9: error: not defined ident '_rawdata' lda #<_rawdata ^ .\screen_test.asm:43:1: note: searched in this object only start .proc ^
  17. Thank you. There is actually a slightly bigger enemy (though marginally so) that appears at stage 9 and later. I guess you just have to practice to get that far. BTW, the enemies are actually 4 (2x2) characters in size. I support movement "within" the characters using the 16 PETSCII characters that cover all the variations of 2x2 "sub bits". I was inspired by PET/C64 Galaga (which this is basically a clone of). I don't currently support any larger enemies though that is of course completely possible, e.g. Galaga had a 3x2 char sized enemy. It is something I have noted down as a possible improvement.
  18. A new update of Petaxian has been uploaded with the following main changes : Added random "attacks" for enemies (with increased bomb frequency) Updated to non-uniform waves. Remixed to 12 stages. Add stage start "announcement" Add stage completion time bonus points Unsurprisingly there is a lot work left after the basic gameplay mechanics is implemented. It certainly makes one appreciate all the other non-coding work that goes into games (I certainly see why having professional level designers and testers are necessary). I want to add some sort of proper "game end" (and show current high score) but after that I suspect updates to this game will slow down. I have a couple of other game ideas I'm considering (none especially original).
  19. There are plenty of tutorials for 6502 assembly out there (here is one that starts gently https://codeburst.io/an-introduction-to-6502-assembly-and-low-level-programming-7c11fa6b9cb9). It might not be a bad idea to do read a few such documents before jumping into videos. I think you probably should not start out with something too ambitious for your first attempts. You probably can a lot of smaller programs without having to deal directly with the stack pointer. You can start by transferring parameters in the registers (A, X and Y) and/or direct memory addresses (Zero Page or not) and limit your self to implicit stack use with JSR/RTS. I'd also recommend taking looking at Prog8 (https://prog8.readthedocs.io/en/latest/#). This gives you something a lot faster than Basic while not being as completely low level as assembly. Prog8 allow inclusion of assembly into the program fairly gracefully when you need "full speed" and if you just need a few really fast (non-recursive) functions you don't not need to learn to use the program stack. And since Prog8 produces assembly output (before producing the binary with 64tass) it will also allow you to learn a lot from looking at the produced output when you are interested. BTW, back in the day (80's) when I did some limited machine code programming I basically had no understanding of the stack and the only stack related commands I used was just JSR and RTS. But what I wrote then was basically stuff gleaned from some assembly examples in various C64 magazines and I probably only understood about half the 6502 instruction set.
  20. And it turns out you are 100% correct here. For Petaxian the output from 7.0-beta compiler runs fine in the current compiler.
  21. Nice! I guess I have to jump over to the 7 real soon. I was waiting for an official release of the new XC16 emulator, but there are so many updates now I'd like to use. I can always test using VICE for a while.
  22. I tried this screen { testlabel: %asmbinary "data.bin" ... } but get the following error : screen.p8:3:9: no viable alternative at input 'testlabel:'
  23. Ok, so I have a questions about adding larger sets of data in Prog8. Since the byte/ubyte data structures are limited to 256 bytes I have so far just split data into multiple arrays. That works well enough for now. However, let's say I want to update a full screen (40x25 for C64, more for CX16). It gets awkward to split this up into many arrays. It looks like perhaps %asminclude might be something but it's not obvious how to use this. I created a file screen.asm which contains my screen data : screen_char BYTE $20, $20, $20 .... and include this in a module screen { %asminclude "screen.asm", "screen" ... } and attempt to get hold of this label with something like uword ref = screen.screen_char without any luck (I tried various with and without various prefixes). According to the doc I should have access to the labels. I expect I'm doing something wrong but without any examples I don't know how to use this beyond this.
  24. Did a quick update of Petaxian with a workaround for the NES keyboard emulation (thanks to desertfish for pointing out that this was pretty trivial to add).
  • Create New...

Important Information

Please review our Terms of Use