Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. Ender's post in Converting asm VERA and ROM code from r38 emulator to r41 emulator was marked as the answer   
    The layer1 map is $1B000 now. The character tile set is at $1F000.  The layer 0 map base doesn't have a default value, but space is available for it at $00000 now.  The palette is still at $1FA00.
  2. Ender's post in Loading Code From Banked RAM In C was marked as the answer   
    Looking at your screenshot, it looks like the first two bytes are the address to load to (00 A0).  This is normal for the PRG format, so I guess the compiler just treats it like a normal PRG file.  So when you're doing your copying, you would start at byte 2, not byte 0.
  3. Ender's post in Building on OpenBSD was marked as the answer   
    Blue screen means it's the wrong version of the ROM.  If you're building the most recent commit of the emulator, then you also need to build the most recent commit of the ROM.  I've attached it here, but if the emulator updates further and you compile it again and it goes back to a blue screen then you'll need to recompile the ROM.
  4. Ender's post in Accessing VLOAD from cc65 was marked as the answer   
    Looking around the cc65 source, it doesn't seem like there is a vload to me.  So you would have to do something like (note I didn't test this and I haven't really done any C with the X16 so something might be wrong):
    The first argument to cbm_k_load() would be 2 for bank 0 and 3 for bank 1.
  5. Ender's post in Emulator slow-down issue was marked as the answer   
    The in-browser emulator seems to run fine, no stuttering, I forgot to mention that.  Changing the desktop resolution doesn't seem to matter (which surprised me. what the heck is going on?!).  I even tried turning off HDR since this TV supports it so I had turned it on.  Still no difference.
    Edit: OK, so I think I figured it out.  After I got this TV I messed around with my NVIDIA control panel settings, and I had set the max fps to 58 for some reason (since I don't have HDMI 2.1 yet I can only do 60hz refresh rate).  Limiting it in this way seems to have made the emulator run slightly slower than it would.  I don't think I need this since I think it's mainly for G-sync and I have that turned off right now (yet again I'd need HDMI 2.1 for that).  Once I turned that off it seems to be back to normal.
  6. Ender's post in cc65: cbm_k_load into banked RAM was marked as the answer   
    The bug was specific to SD cards, where it would ignore the address being passed in and just use the address in the first two bytes of the file.  So I checked with your program, and sure enough it seems to be loading into the address that the first two characters translate into (in my case it was "hi", so it would load into $6968).  This is odd, because the BASIC LOAD command seems to work fine when using the host file system.  Normally the secondary address (SA) is set with SETLFS, and it should be 0 in order to use the addressed passed in instead of the one in the file.  I could see that your SETLFS was correctly setting it to 0, so I stepped through in the emulator debugger to see what was happening.  It looks like OPEN is changing it to $60!  So then I wondered how the BASIC LOAD command is working, and from what I can tell, it never actually calls OPEN (???).  So as an experiment, I tried removing the OPEN line from your code, and it seems to work then.  From everything I could find though, it says to use OPEN before calling LOAD so I'm a bit confused...
    Edit: After a little more reading, it seems you shouldn't call OPEN before LOAD.  From https://www.pagetable.com/c64ref/kernal/#LOAD
    ^ Claims that LOAD calls OPEN. I went and looked at LOAD and it does seem to call OPEN itself, so that might explain it.
  7. Ender's post in Howto get banked RAM size was marked as the answer   
    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.
  8. Ender's post in r38 broken kernal save routine?? was marked as the answer   
    A few things I'm seeing.... First of all, I'm not sure how you're calling the code, but if you're doing it with "SYS $2F00" for example, this will not behave as expected, since your filename definition is at the beginning.  It should be moved to the end, after the "rts".  Secondly, as pointed out, your secondary address should be 1 when calling SETLFS.  0 saves it as a BASIC program, 1 does a raw save, which is what it looks like you're trying to do.  Third, the length of your filename is 11, not 10, so A should #$0B when you call SETNAM.
    Edit: Nevermind what I said about the SA needing to be 1 when calling SETLFS.  I took a look at the code in the emulator for non-sdcard saves, and the ROM for sdcard saves, and it seems the SA isn't even used by the X16 for saving.
    Edit edit: I was wrong about the third thing too 😅
  9. Ender's post in LOAD into VRAM was marked as the answer   
    You can load into VRAM by setting the A register to 2 or 3 when you call load. 0 for no verify, 1 for verify, 2 for loading into VRAM bank 0, 3 for loading into bank 1.
  10. Ender's post in how to reset the machine from software? was marked as the answer   
    Are you making sure to set the ROM bank to 0 first? I took a look at what the RESET command does, and it pretty much just sets the ROM bank to 0 and jumps to ($FFFC), so I'm not sure why it wouldn't work for you.
  • Create New...

Important Information

Please review our Terms of Use