Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Ender

  1. Greg King is the expert on this, but it looks like you can call clock_gettime() The code for it is here https://github.com/cc65/cc65/blob/master/libsrc/cx16/gettime.s
  2. I believe these special codes are just meant for printing strings with the "CHAR" command (and GRAPH_put_char in assembly) in screen 128 mode. Looking in the kernal source, in kernal/fonts/conio1.s, it looks like those two particular character codes haven't been implemented yet. Bell just maps to nop, and tab maps to a routine that just has the comment "; XXX what should TAB do?" and returns. Edit: Looking at the documentation again, it has this note in it: $07/$08/$09/$0A/$18: have been added for ASCII compatibility [NYI] I believe "NYI" means "not yet implemented".
  3. For a while now, the only time I can get myself to play games are with my friends. So mostly just multiplayer things like Monster Hunter, GTA V, and more recently Phasmophobia. We've played a lot of each Dark Souls as they came out. We play WoW for a while each time a new expansion comes out. Probably a lot of other things we played for a brief time that I can't think of right now. The only single player games I can think of that I've played and beat recently are The Last Guardian, Black Mesa, and Inside. I started Breath of the Wild but I still haven't beat it.
  4. Native English speaker here. It looks OK to me, English-wise The only comment I have is I've run in to a bug a couple times where I crash at the finish line, like it's treating it as if it were an obstacle.
  5. Ah right, I was thinking of .byte when I read it and didn't notice it, the same as you All I knew was that when I stepped through it I could see that that's what was happening so I figured it must be that it was in the middle, based on the coding practices of other stuff I've looked at (I haven't been doing cc65 assembly for long).
  6. I don't think you can declare variables in the middle of your code like that, at least not with cc65, unless you use segments. The "PrDec16Tens" and "pad" declarations should be at the end. From what I can tell, when pad is written to, it's overwriting the first command of PrHex8, changing it from PHA to "BMI $8fd". Therefore, when you PLA later on the stack gets screwed up. If you move those declarations to the end it works.
  7. It's the monitor's job to add a border or scale or do whatever, not the device sending the signal. Being able to fine tune the X and Y size isn't very common on modern monitors, usually they'll try to adjust it automatically. On my monitor, for instance, it has the option to add black borders on the left and right for non-native aspect ratios, but not on the top and bottom. So it will automatically scale to fit vertically. And since my Y resolution isn't a multiple of 480 (it's 1080), it would probably look blurry. Like Cyber said though, for really high resolutions like 4k or 8k, this isn't as much of an issue.
  8. I used WSL to do it. That way you can do it the usual Linux way. Unfortunately it was a while ago so I forget all the steps I took. Looking at this page though, I'm pretty sure this is basically what I did (note that you need WSL2 to mount loop devices). Hope it helps: https://web2.clarkson.edu/projects/itl/honeypot/ddtutorial.txt
  9. If you've compiled the rom, it creates .sym files in "build/x16" for each module that has all the labels and their addresses. So if you look in "build/x16/basic.sym" there's one for strout.
  10. Oh cool, well if you already have an example of how to use it, then it's worth a try. You'd just change the definition of STROUT to $CD52, and make sure to change the ROM bank to 4 first.
  11. Well, if the address is a spot within the BASIC code, then it's not a vector kernal routine, therefore something not meant to be used by the user. That said, it looks like it's $CD52 on bank 4 on the X16 (in the source code it's in basic/code7.s). You can play around with it if you want, but it probably requires a very specific setup to actually use it.
  12. From what I can tell, CHROUT and BSOUT are simply two different names for the same function. Some references call it BSOUT, some CHROUT. I'm not sure what "STROUT" is. Kernal routines start with "FF" and on the X16 $AB1E would be in RAM, so no code would be there unless your program put something there. For the other question, it looks like BASIC GET does a lot of things, but when I skimmed it looking for a kernal call, it seems that it calls GETIN, which simply removes and returns a character from the keyboard queue.
  13. The behavior of ramtas, which is what initializes memory and detects the number of banks and reports the total memory at bootup, seems to rely on it working this way. If it doesn't work on actual hardware, wouldn't they have seen it in their testing?
  14. If I'm not mistaken, I think in those examples, something like "{CLR/HOME}" is supposed to be replaced with pressing the "CLR/HOME" key, not actually typing out "{CLR/HOME}"
  15. Probably the game I played the most on my C64/128 when I was a kid was "Super Mario" which was actually just a reskinned Great Giana Sisters. I had no idea it wasn't actually Super Mario back then haha.
  16. My collection isn't very big. My interest in retro things started when I was a kid with a C64, which my uncle gave to me. He later took it back and gave me a C128, which I still have in storage, along with a floppy disk drive and a monitor for it, and tons of books. It hasn't been turned on in like 15 years so I don't know if it still works. I really need to set it up again and see if it still works. If we're mentioning old video game consoles then I have: Sega Gamegear Sega Genesis PS1 PS2 Xbox original N64 Gamecube Gameboy Color We also have an Intellivison in storage somewhere that also hasn't been turned on in a long time, so who knows if that still works.
  17. Good question. I just tested it with starting the emulator with "-ram 2048" and yeah, it looks like it returns 0.
  18. This is with R38 right after returning from $ff99. You can see that $40 is in A.
  19. In what way? I just tested it and it seems to work for me.
  20. You can set the carry flag and then call memtop at $ff99. This will return the number of ram banks on A and a pointer to the top of memory in X and Y. Keep in mind that bank 0 is used by the kernal, so really only 1 on are free.
  21. I was curious so I took a look at the way LOAD works. From what I can tell, it puts 0 in to A, pushes it on to the stack, parses the arguments from the LOAD statement, then pops the 0 back off the stack to A, then calls the kernal LOAD routine. A is what determines how LOAD behaves. 0 just means load to CPU memory, so it's basically hardcoded to always do that. I looked at the history of the file, and as far as I can tell, this was always the behavior, so I'm kind of surprised it was ever able to load in to VRAM. (Maybe it did before the current logic of A > 1 meaning a bank of VRAM?)
  22. What is it that's not working for you guys? The LOAD statement?
  23. D'oh, I forgot about that situation too. After some more fiddling I came up with this. It seems like it's probably not the most elegant solution, but it seems to work for me. Basically it just asserts there's at least one character that's not space, semicolon, or a register followed by anything not a semicolon, followed by a register. ^\\s*[^ ;AXY][^;]*\\b([AXY])\\b
  24. Ah. I didn't think of the situation where there might be a X, Y, or A in the comments. I think we want to just match the first instance, right? I can't think of a situation where there would be more than one register on a line (besides in comments). To match only the first instance, we can make the + and * be non-greedy by adding a ? after, like this: ^\\s*\\S+?.*?\\b([AXY])\\b
  25. In the regex I wrote, the part you want to match is just the [AXY], so I put it inside of a capture group. That statement should choose only group 1 for the match. I found a reference to it here https://gist.github.com/Aerijo/b8c82d647db783187804e86fa0a604a1
  • Create New...

Important Information

Please review our Terms of Use