Jump to content
Michael Steil

Emulator r38 Released

Recommended Posts

I don't see any "breaking changes" in any of the release notes. Is this true? Should we expect any r37-compatible software to run without modification?

Share this post


Link to post
Share on other sites
21 minutes ago, SlithyMatt said:

I don't see any "breaking changes" in any of the release notes. Is this true? Should we expect any r37-compatible software to run without modification?

There should be no breaking changes... except for one thing. IIRC, I had to disable loading into banked RAM or VRAM using the LOAD KERNAL API ($FFD5).

Share this post


Link to post
Share on other sites
Posted (edited)

If that's the case, it's a pretty big breaking change! Is there a workaround other than loading to main RAM and then copying?

I just tested the Windows build of R38 and Cavy's Quest ran perfectly. So, LOADing to VRAM and banked RAM are still working. 😁

Edited by SlithyMatt
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

I'm having trouble getting the SD Card image to work... has anyone else done so successfully yet?

My bad. I had the wrong version installed. I'd somehow clicked the Linux version and so was still running r37 from my batch file. 

What I'm trying to figure out now is why this simple program isn't creating a file on SD...

image.png.45d417d00533df40b8e47a07cfcbe7ce.png

I'm probably doing something wrong... I suppose it's time to RTFM.

Ah, stupid me... "TEST.SEQ,S,W"

Edited by TomXP411
found the problem.

Share this post


Link to post
Share on other sites

Yay! SEQ files work! Now I can really start working on a couple of programs I've been putting on the back burner....

100 OPEN 8,8,8,"@:TEXT.TXT,S,W"
110 FOR T=1 TO 10
120 PRINT#8,"LINE";T
130 NEXT
140 CLOSE 8
200 PRINT "\X11FILE CONTENTS"
205 PRINT "-----------------------------"
210 OPEN 8,8,8,"TEXT.TXT,S,R"
220 IF ST<>0 THEN 250
230 INPUT#8,A$:PRINT A$
240 GOTO 220
250 PRINT "-----------------------------"
260 PRINT "END OF FILE"
270 PRINT "STATUS";ST
280 DOS
290 CLOSE 8
300 OPEN 8,8,8,"NOFILE,S,R"
310 PRINTST:DOS
320 CLOSE 8
READY.
RUN
FILE CONTENTS
-----------------------------
LINE 1
LINE 2
LINE 3
LINE 4
LINE 5
LINE 6
LINE 7
LINE 8
LINE 9
LINE 10
-----------------------------
END OF FILE
STATUS 64
00, OK,00,00
 0
62, FILE NOT FOUND,00,00
READY.
█
	

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@Michael Steil is there a way to read a directory listing into a BASIC program, yet? I was thinking of writing a file manager/launcher, but there doesn't seem to be a way to open "$" for reading. 

 

  • Like 1

Share this post


Link to post
Share on other sites

Michael, RE: disabling load/save from banked RAM... it looks like it is disabled for using the sdcard, but it appears to work without it (e.g. using the host file system). Can you let us know how the load/save kernal calls are intended to operate on the final unit?

  • Like 1

Share this post


Link to post
Share on other sites

I tested Chase Vault using an SD Card image, and it hangs when trying to load data into banked RAM, which is definitely new behavior for R38. Oddly enough, the emulator had no problem loading data from the SD card image directly to VRAM, so it seems like it is only disabled for banked RAM. Also, it appears that LOAD "$" hangs as well with the SD card image.

Share this post


Link to post
Share on other sites

Every release feels like christmas. THANKS Michael Steil and everyone that have contributed! And a special thanks to @StephenHorn for the improvements to VERA! I have really been waiting for raster line and sprite collision interrupts!

Great also that WAI is now implemented. I actually thought it worked already. I have been using it for quite a long time but the code must just have resulted in a busy wait...  This must be the answer to why WAI (sorry, trying to be funny) has been so slow in response.

  • Like 1

Share this post


Link to post
Share on other sites

Can someone tell me what Chars are that on a DE Keyboard layout?

 

Ctrl + = and Ctrl + + will toggle warp mode.

 

I have no clue how to enable warp mode or how to identify I am in warp mode. Any idea?

Share this post


Link to post
Share on other sites
5 minutes ago, SerErris said:

Can someone tell me what Chars are that on a DE Keyboard layout? I have no clue how to enable warp mode or how to identify I am in warp mode. Any idea?

Try ß, +, -, = ... those keys near the backspace key... If you're okay with warp mode being enabled for the whole session, you can specify -warp on the command line.

If it really doesn't work on non-US/ISO keyboards, I can change the shortcut to something else in the next release. In this case, file an issue on GitHub against x16-emulator.

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Hmm ... according to this picture the US keyboard has the + and = at the same key ... just shifted.

On a German keyboard this is the "´" key and the "`" key. The later one is with SHIFT. The documentation should better read CTRL-= and CTRL-SHIFT-=

It works ... however the same key is in X16 the "UP ARROW" key.

1119982045_Anmerkung2020-08-27144607.thumb.jpg.031aca6fc2d5b4d5ac7ef8643a286d06.jpg

Edited by SerErris

Share this post


Link to post
Share on other sites

Great progress!

The following C code example works with cc65 for writing/reading files with an sdcard image attached to the emulator.  If the load/vload worked as well I could add a logging capability to libX16 that would let a program do debug logging to a file for debug purposes.  I'd love to support something like that for the host filesystem interface as well someday.

 

#include <string.h>
#include <stdio.h>
#include <cbm.h>
#define MAX_BUF_SIZE 80
 
int cbmwritefile()
{
char data[80];
int ssRet=0;
char ucDev=8;
char filename[20];
int len=0;
 
strcpy(data, "this is just an example text.");
len=(int)strlen(data);
 
strcpy(filename, "@0:cbmdata,w");
 
ssRet = cbm_open(2, ucDev, CBM_WRITE, filename);
 
if(! ssRet)
{
if(data != NULL) {
 
if(len >= MAX_BUF_SIZE) {
len=MAX_BUF_SIZE;
data[MAX_BUF_SIZE]='\0';
cbm_write(2, &len, 2);
cbm_write(2, data, len);
} else {
cbm_write(2, &len, 2);
cbm_write(2, data, len);
}
printf("writing file '%s'\r\n", filename);
}
}
else
{
printf("**error - can't write file: '%s'", filename);
}
 
cbm_close(2);
 
return ssRet;
 
}
 
int cbmreadfile()
{
int ssRet=0;
char ucDev=8;
char buffer[MAX_BUF_SIZE];
char filename[20];
int flen=0;
 
strcpy(filename, "@0:cbmdata,r");
memset(buffer, 0, MAX_BUF_SIZE);
 
ssRet = cbm_open(2, ucDev, CBM_READ, filename);
 
if(! ssRet)
{
cbm_read(2, &flen, 2);
cbm_read(2, buffer, flen);
printf("reading file '%s'\r\nlength: %d [ %d max.]", filename, flen, MAX_BUF_SIZE);
printf("\r\ntext : %s\r\n", buffer);
}
else
{
printf("**error - can't read file '%s' ", filename);
}
 
cbm_close(2);
 
return ssRet;
 
}
 
int main()
{
int ssRet=0;
 
printf("** filetest 0.2 stdio.h / cbm.h **\n");
 
printf("calling cbmwritefile()\r\n");
ssRet = cbmwritefile();
printf("err: %d\r\n", ssRet);
 
 
printf("calling cbmreadfile()\r\n");
ssRet = cbmreadfile();
printf("err: %d\r\n", ssRet);
 
return 0;
 
}
 
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

 

1 hour ago, Scott Todd said:

I tried r38 on my Mac and it doesn't go. R37 works fine but when I try r38, I get this. Any ideas?

Screen Shot 2020-08-28 at 11.45.05 AM.png

Scott,

It should work.  I installed r38 on my  Macbook Air and it runs just fine.

 

Capture d’écran, le 2020-08-28 à 16.53.12.png

Share this post


Link to post
Share on other sites

I'm not a Mac guy, but is it possible Scott is missing something like C development libraries or something? Could/should they try installing GCC or something?

Share this post


Link to post
Share on other sites
2 hours ago, SerErris said:

SDL libraries ??

It was claiming to not have libobjc.a (or not be able to find the call inside of that library). That seems like a problem with the standard C library installation, not SDL2.

Share this post


Link to post
Share on other sites

But I find its odd r37 runs fine. i was hoping someone could offer insight into what changed between revisions. All I did was download the link and unzip it. I don't remember doing any more on the x37 version. I just verified again the r37 release works fine.

Share this post


Link to post
Share on other sites

This happened to me as well. When I read the terminal text it seems to suggest that I need  10.15(I have 10.13) Is this correct?

Share this post


Link to post
Share on other sites
Posted (edited)

10.12  😞

 

I probably need to upgrade it. It just scares me. I'm bumping up against my SSD (128G) being full. I'm worried the new OS will kill it.

 

Scott

Edited by Scott Todd

Share this post


Link to post
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.


×
×
  • Create New...

Important Information

Please review our Terms of Use