Jump to content

Emulator r39 Released


Recommended Posts

Wow!  Looks great!

Quick note to those who using the kernal `joystick_get` routine.  It looks like both `JOY` BASIC command and the kernal `joystick_get` have changed.  Previously the `A` register was used to pass the joystick number, 0 through 3.  Now 0 means the new keyboard joystick, and 1 though 4 are for actual joysticks (SNES controllers).  Tripped me up until I diff'd the docs.  Other than that, my programs all ran perfectly!

Excellent work, everyone!

Link to comment
Share on other sites

Trying the MacOS binary causes the following error:

"dyld: Symbol not found: _GCHapticDurationInfinite"

Haven't had time to investigate, but it seems to be a resource made available in MacOS 11 (released November 2020), which I'm not running.

I could, however, clone the emulator master branch, and successfully build and run it on my Mac.

Link to comment
Share on other sites

On 3/29/2022 at 11:12 PM, Stefan said:

Trying the MacOS binary causes the following error:

"dyld: Symbol not found: _GCHapticDurationInfinite"

Haven't had time to investigate, but it seems to be a resource made available in MacOS 11 (released November 2020), which I'm not running.

I could, however, clone the emulator master branch, and successfully build and run it on my Mac.

Gotta have Catalina.

 

I upgraded just so I could run the r39 binary.

 

I thought about building, but got lazy.

Edited by rje
Link to comment
Share on other sites

I found that r39 wouldn't print text with one two three four any of my C programs.  Make clean, make all, run.  No text.

Not quite NO text: It prints text with one of my programs.... until it clears the screen the second time, then no more.

The programs still work fine on r38, so it's a change in the emulator, one way or the other.

 

Ah, my bank switching updates location $00 AND $9f61... not great, but also not the problem (I comment out that line, and I get the same results).

I'm also not sure it's loading the font file like it did before (that is, it's not working, or perhaps it's working differently).

Hm, it also doesn't seem to be showing my sprites.  So I'm probably not doing something correctly.

 

...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.

 

Edited by rje
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Super Administrators
On 3/29/2022 at 9:23 PM, rje said:

I found that r39 wouldn't print text with one two three four any of my C programs.  Make clean, make all, run.  No text.

Not quite NO text: It prints text with one of my programs.... until it clears the screen the second time, then no more.

The programs still work fine on r38, so it's a change in the emulator, one way or the other.

 

Ah, my bank switching updates location $00 AND $9f61... not great, but also not the problem (I comment out that line, and I get the same results).

I'm also not sure it's loading the font file like it did before (that is, it's not working, or perhaps it's working differently).

Hm, it also doesn't seem to be showing my sprites.  So I'm probably not doing something correctly.

 

...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.

 

The text frame buffer is now $1:B000

If your C programs use direct access, rather than KERNAL printing, then you need to modify the library code to use the new address. This will definitely have to be updated in cc65 and Kick C.

 

  • Thanks 1
Link to comment
Share on other sites

  • Super Administrators
On 3/29/2022 at 11:16 PM, AndyMt said:

I wonder what happens to the "try now" feature. Will software be able to specify which emulator version to use or will almost all software in the download section break?

I'm not sure... for now, Try It Now is R38. I'll see what we can do; we may be able to get separate emulators up for R39 and R39. That's down the road, though, and probably won't get done until summer.

 

  • Thanks 1
Link to comment
Share on other sites

I think sprites are ok -- I can see one, so I assume they're good -- but some address gets jostled around somewhere so that printf, cprintf, and the various .put.() fail.  I'll dig around and look for an old address.

 

 

 

Edited by rje
Link to comment
Share on other sites

The problem appears to be with conio -- cprintf(), cputX(), etc.  The stdio outputs work -- printf, puts, etc.

libsrc/cx16 doesn't have its own conio, but it does have its own cputc... which seems to be perfectly fine, no VERA addresses stored there I think.

...and yet, cputc('x') does not output character 'X' to the screen (or anything that I can tell).

 

More interesting, cgetc() appears to hang.

 

 

Since conio does "direct videoram access", it makes sense that an address somewhere might need updating.

 

 

Edited by rje
Link to comment
Share on other sites


I just recompiled my program and ran on the R39 and i get these strange behaviour. It seems the R39 has more changes internally.

Will try to find the root cause, but does somebody know if the vera character map tiles have been moved from 0:F800 to somewhere else?

Link to comment
Share on other sites

On 3/30/2022 at 10:29 AM, svenvandevelde said:


I just recompiled my program and ran on the R39 and i get these strange behaviour. It seems the R39 has more changes internally.

Will try to find the root cause, but does somebody know if the vera character map tiles have been moved from 0:F800 to somewhere else?

VERA's default memory layout changed. It's in the PRG. Or here.

Screenshot_20220330-103326.thumb.png.13657e89ed323b3141e3bed49aad37b0.png

Link to comment
Share on other sites

So in my program i moved the characters like this when in R38 the program started:

image.thumb.png.e5bb8b6d9cfd4d29363f3ecfb9e30c69.png

 

In the code the VERA_PETSCII_TILE would have value $F800.

So now with the R39, it seems that the character set has been optimized and i don't need to move anything :-).

It seems that the character map is already at $01:$B000 and the petscii tiles at $01:$F000 !

Edited by svenvandevelde
Link to comment
Share on other sites

Any known issues with the mouse pointer? It seems the mouse pointer "get" api at $FFB6 is not working as expected.

Maybe I'm wrong, i baseline the mouse vectors to be returned at $22, which should be available to the user, right?

But it's not working. No mouse movement ...

 

 

Link to comment
Share on other sites

On 3/30/2022 at 12:40 PM, ZeroByte said:

Has cc65 updated the repo yet to be R39 compliant?

No.   cc65's cputc(), cputs(), and cprintf() appear to be non-working for X16.r39.  Text frame address change?

Edited by rje
Link to comment
Share on other sites

  • Administrators
On 3/30/2022 at 6:44 PM, svenvandevelde said:

And the interrupt return vector has changed also 🙂.

Where was that again ... address vector in $0314 ....

let me check ... E040?

The location of the default IRQ handler is not API and must not be relied on. It changes in every single revision of the ROM.

Read the current value in your code, and jump to it at the end.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use