Recent content by millenniumtree

  1. millenniumtree

    cc65 help

    Everything posted above used cgetc or scanf, but what those do under the hood, I'm not sure. Do they actually call the ROM functions, or something else? UPDATE: Found it. In the cc65 libsrc/cx16/cgetc.s file, we have assembler code that looks like the following... And clearly, it uses the...
  2. millenniumtree

    cc65 help

    And... How might we do this in C? ;) I'll see if I can figure it out.
  3. millenniumtree

    cc65 help

    I was still trying to figure out how to convert typed character codes into something you'd expect to be output, without having multiple 512 byte lookup tables, or huge if/else blocks. So the problem is that there are 3 different character codes being used when you write strings in C. 1)...
  4. millenniumtree

    BASIC without line numbers?

    Has anyone considered implementing FastBasic? https://github.com/dmsc/fastbasic/releases I just found it, and it looks promising. It's a complete rewrite of ATARI basic, that actually compiles to machine code on the device. It does an intermediate tokenization as you write code, similar to...
  5. millenniumtree

    Mouse support

    So it looks like the Features document Periphractic posted lists PS/2 mouse support. Has anyone tried this? I'm interested to see an example! And also if it works in the emulator.
  6. millenniumtree

    C -> 6502 assembler in the browser!

    What a time to be alive!
  7. millenniumtree

    I got it to generate the map. Controls are wacky though. W,A,Right,Down work as expected. D...

    I got it to generate the map. Controls are wacky though. W,A,Right,Down work as expected. D moves down S does nothing Left does nothing Up does nothing The other controls (IJKL?) also don't do what you'd expect. Using only W,A,Right,Down,Space,Enter, I was able to play the game though...
  8. millenniumtree

    Awesome! :D

    Awesome! :D
  9. millenniumtree

    C -> 6502 assembler in the browser!

    I just discovered an amazing tool for learning 6502 assembly. Basically, you enter C code (or several other languages) on the left, and it shows you what that compiles into on the right. All from the comfort of your browser. https://godbolt.org Choose your language in the left panel (C, C++...
  10. millenniumtree

    I also have r31. Weird. I'm running it in Linux. Character limit, so less than you requested...

    I also have r31. Weird. I'm running it in Linux. Character limit, so less than you requested. 730 IF IX<MW%-1 THEN IF MF%(IX+1,IY)=9 THEN MT%=MT%+1 740 IF IY<MH%-1 AND IX>0 THEN IF MF%(IX-1,IY+1)=9 THEN MT%=MT%+1 750 IF IY<MH%-1 THEN IF MF%(IX,IY+1)=9 THEN MT%=MT%+1 760 IF IY<MH%-1 AND...
  11. millenniumtree

    cc65 help

    Some weird behavior when printing characters. I think it has to do with strings being entered in ASCII. I've written an 'a2p' (ASCII TO PETSCII) function to pipe strings through, and will post it later if anyone is interested. (sorry for all the edits - I want this information to be accurate...
  12. millenniumtree

    minefield. Syntax error in 790 As it's trying to show the generated map

    minefield. Syntax error in 790 As it's trying to show the generated map
  13. millenniumtree

    cc65 help

    Some other things I've discovered: // These switch between upper and lowercase charsets, without clearing the screen cbm_k_bsout(CH_FONT_UPPER); cbm_k_bsout(CH_FONT_LOWER); // These are equivalent, but less obvious printf("%c",142); printf("%c",14); // You can clear the screen with either of...
  14. millenniumtree

    cc65 help

    I've played around with this a bit now, and am exploring the different character sets. Here's a 'bare minimum' C source to get you started. #include <stdint.h> #include <stdio.h> #include <conio.h> #define POKE(addr,val) (*(unsigned char*) (addr) = (val)) #define POKEW(addr,val)...
  15. millenniumtree

    BASIC without line numbers?

    I didn't realize there was so much scanning being done in BASIC - no bloody wonder it's so slow. What happens to the loop stack pointers when you GOTO out of 3 nested loops? Are there stack pointers at all? Sheesh! Also - if there is to be a numberless editor, could it do auto-indentation? (the...