Jump to content

Fippy

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Fippy

  1. This was it! The filename was buried in my code in RAM Bank 1, since it fixed data. I moved it to my data segment in main RAM and now the Save works just great. Thanks folks.
  2. I'm not trying to save from RAM Banks but from main memory ($08A0). I was just commenting that I was using RAM Banks, sorry if I confused the issue. Because I need a LOT of data, my code goes into RAM bank 1 and the data resides in the main 38k chunk. You can see the $08A0 address in the code above and no Bank selecting, unless there's something else I'm not aware of.
  3. Hey commander experts, Kernal SAVE is always failing for me, LOAD works fine, or at least in the loading code into different banks does. I'm using emu r38. Obviously missing something obvious. I followed Matt's Kernal video. The Error code is 04 (FILE_NOT_FOUND), which is a little odd on a SAVE Here's the snippet of my code, pretty much hardcoded values to test. lda #1 ldx #SD_DEVICE ldy #0 ; I've tried #1 as well jsr SETLFS lda #11 ldx #<filename ldy #>filename jsr SETNAM lda #$A0 ; data segment starts at $08A0 sta TEMP ; stores start address (TEMP is $3A in zp) lda #$08 sta TEMP+1 lda #TEMP ; start addr ldx #$FF ldy #$09 jsr SAVE bcs @error ........ filename: .byte "savgame.bin"
  4. How do I switch bank for the 'm' command in the debugger? I loaded code into Bank1, but when I 'mA000' it shows me bank 0, and I can't find the syntax to switch to viewing Bank 1. Thanks.
  5. I only have one org, but I notice the linker decided which code to put where, which is kind of annoying. As my code grows I think it is overwriting my DATA segment. I don't have an org for that. Wish I knew the rhyme and reason where the linker puts things.
  6. On the subject of using cl65, I just use it to compile and link everything with *.asm as the filename. This might be the reason for my issue below: (sorry to tack onto the OP's question, but it is somewhat relevant and likely will bite others) Usually I use .org $80d, then the .segment statements then the first line of my code, and this has been working. Now that my project is several K large and split across a dozen files, it's inserting other files at $080d ahead of my start code, which of course is disastrous. Is there a recommended fix for this other than explicitly listing the .asm files on the command line ensuring main.asm is first?
  7. Ah. Thanks for the replies folks! So is it best practice to call $FFD2, or the ram vector itself, or the actual default address at $FEDE? Also, do the other Kernal functions like PLOT, clear screen etc still exist? They were in your videos, Matt, but not in the Reference Manual.
  8. Hey all, First attempt at getting some text on the screen in 6502. I notice inconsistencies between the Programmers Reference Guide and some of Matt H.'s videos. Example: CHROUT = $FEDE or $FFD2 CHRIN = $FEE1 or $FFCF I've seen 2 values for each of these. I've also seen both values in the videos. In the videos there's mention of PLOT, SCREEN, clear screen and GETIN, and none of these seem to exist in the Programmers Reference Guide. Do those kernal routines exist still? I hope so. Also, any attempt I make to display characters results in garbage characters. See sample assembly below. Using: cl65 -t cx16 -o HELLOWORLD.PRG -l listing.map *.asm ./x16emu_mac-r38/x16emu -prg helloworld.PRG I also notice that in memory, the "Hello" appears as ?ELLO, which is peculiar, making me suspect it doesn't know about PETSCI? Thanks for any help, Fippy
×
×
  • Create New...

Important Information

Please review our Terms of Use