Jump to content

paradoxnj

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About paradoxnj

  • Birthday 08/24/1973

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sorry for the late reply....LOAD uses the carry bit to signify an error in loading. http://c64os.com/post/c64kernalrom#file_load
  2. Refined the macro a bit more and got rid of the clc and adc instructions. .macro loadVRAM(filename, filenameLength, address) { lda #filenameLength ldx #<filename ldy #>filename jsr CX16.SETNAM lda #1 ldx #CX16.HOST_DEVICE ldy #0 jsr CX16.SETLFS ldx #<(address & $FFFF) ldy #>(address & $FFFF) lda #(((address >> 16) & $F) + 2) clc jsr CX16.LOAD }
  3. Finally got it!!! I used a macro instead of a function for load_file_into_vram. I was able to abstract the bank that way and keep it like a function call. I know that is repetitive code in the end and I will still work to get that correct but for now it works. .macro loadVRAM(filename, filenameLength, address) { lda #filenameLength ldx #<filename ldy #>filename jsr CX16.SETNAM lda #1 ldx #CX16.HOST_DEVICE ldy #0 jsr CX16.SETLFS ldx #<(address & $FFFF) ldy #>(address & $FFFF) lda #((address >> 16) & $F) clc adc #2 clc jsr CX16.LOAD } bmp_pal: .text "FF1TS1-X16.PAL" bmp_pal_end: loadVRAM(bmp_pal, bmp_pal_end-bmp_pal, CX16.VRAM_palette) loadVRAM(bmp_file, bmp_file_end-bmp_file, VRAM_TILES) This is just a full screen render of a bitmap I had. I am using it for learning as the tiles are 16x16. Now to figure out tile mode using this bitmap.
  4. I made some progress today. I loaded the palette using the "Kick Assembler" way and copied it to VRAM. Now the palette is red and I also found out that the image is actually being loaded even though it is giving me a "FILE NOT FOUND" error and the carry flag is being set. The "Kick Assembler" way is as follows: .var palette = LoadBinary("FF1TS1.PAL", BF_C64FILE) bmp_palette: .fill palette.getSize(), palette.uget(i)
  5. 1. Host file system. The files are in the same directory as the emulator executable. 2. Kick Assembler does translate. I see the names in the emulator memory correctly using the emulator debugger.
  6. Yep...that's what I have been using. It is how I verified the VRAM address.
  7. Ahh...thanks for the VRAM bank find. I will look at the filename address a bit more. I can use my print_string function to see what the file name is being set to.
  8. Sort of like in Chasevault...just formatted for Kick Assembler.
  9. After being semi-successful with C, I am trying my hand at assembler again. I am running into an issue loading data directly into VRAM. Using the emulator's debugging feature, I see my load function is using the correct address. and I have the bank hard coded to "2" right now. I am using Kick Assembler with Visual Studio Code. My function is as follows: My function call, looks like this: I keep getting a "FILE NOT FOUND" error ($04) and static on the screen. Any help would be appreciated.
×
×
  • Create New...

Important Information

Please review our Terms of Use