Jump to content

JimmyDansbo

Moderators
  • Posts

    311
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by JimmyDansbo

  1. On 4/2/2022 at 4:42 PM, SebastianVoges said:

    I will send them over before Monday , Cheers ! 

    I would like to be able to build the web emulator my self, but am stuck  in something like dependency hell. Is there any chance you could show me your tool chain or maybe even guide me?

    I am currently using Linux Mint as my development station, but can easily move to Windows if needed.

    Thanks.

    • Like 1
  2. On 4/6/2022 at 9:50 PM, SlithyMatt said:

    I like the 80x30 mode. I use it for the Patreon screen on my videos, and it looks better than the stubby 80x60 square characters, at least in that case. It would be nice if that was supported with a proper screen mode so that BASIC scrolling works properly.

    I see no problem with scrolling in mode $01 (80x30) with R39?

  3. I am sorry, I may have missed something, but as far as I know it is hardcoded that kernal routines use layer 1. What would be the benefit of having it say so in a register or memory location?

    If you want kernal routines to work with something different than defaults, you should modify layer 1 registers, call kernal routines, then reset layer1 registers if needed.

  4. On 3/30/2022 at 6:23 AM, rje said:

    ...On the other hand, it runs one of my BASIC programs perfectly fine, and that has PSG sound and sprite data it manually transfers into VERA.  So I would say the problem is not with the VERA emulation

    I believe the VERA memory layout has changed a lot. Have a look at the Programmer's Reference https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#video-programming

    Unfortunately I don't think the VERA documentation has been updated yet.

    • Thanks 1
  5. On 1/12/2022 at 9:30 PM, desertfish said:

    I think it's usable from basic as well

    Unfortunately it is not well suited to be used by BASIC. I have just fiddled around a bit with it to see if I could make it usable from BASIC but I seem to run into strange behavior where the emulator just hangs... That is not an issue I have seen when it is used from assembler programs.

    • Like 1
  6. On 12/30/2021 at 7:16 PM, svenvandevelde said:

    How can I identify the ROM version in C? Which adres to peek?

    You read from Addres $FF80 in ROM bank 0

    Quote

    *=$0801
    !byte $0C,$08,$0A,$00,$9E,' ','2','0','6','4',$00,$00,$00
    *=$0810

    KERNELVER    = $FF80
    main:
        lda    $01
        tay        ; Save current ROM
        lda    #0
        sta    $01    ; Set ROM bank = 0
        lda    KERNELVER    ; Read kernel version
        sty    $01    ; Restore ROM Bank

        rts
     

    https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#kernal-version

    • Thanks 1
  7. On 11/16/2021 at 5:30 AM, kelli217 said:

    You could try using the KERNAL routine for plotting the cursor position.

    Yes, that is also possible however it requires that you set the carry flag before calling it to get it to return the actual coordinates.

    Something like this one-liner should work

    Quote

    POKE 783,1:SYS $FFF0:PRINT PEEK(781)

    Address 780-783 are the CPU registers and flags just as the Commodore 64, see https://www.c64-wiki.com/wiki/SYS

    $FFF0 is the kernal PLOT routine, see https://cx16.dk/c64-kernal-routines/plot.html

    You do not have to switch ROM as the BASIC ROM does indeed have stubs to forward calls to the Kernal ROM just as @Scott Robison mentioned.

    Above line will of course use more CPU cycles than a simple peek of a memory address, but you should be fairly certain that the addresses do not change.

    • Like 3
×
×
  • Create New...

Important Information

Please review our Terms of Use