Oricutron Jasmin auto-boot not working

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
Post Reply
christian
Officer Cadet
Posts: 50
Joined: Sun Nov 24, 2013 9:58 pm

Oricutron Jasmin auto-boot not working

Post by christian » Tue Jul 15, 2014 9:37 pm

I'm working with Linux and now that Oricutron can use a keymap, I tested it to replace DosBox+Euphoric.

A new behavior was added between v1.0 and 1.1: jasmin auto-boot but unfortunately it does not work as expected.
With oric-1, the "Ready" prompt is replaced by "Printer error" and with atmos some commands end with "Syntax error" (NEW, RUN, ...)

After some tests and thanks to the memory change breakpoint and the CPU_TRACE option, I think the issue is calcpc and calcop aren't updated before the ay_ticktock function returns to the caller (frameloop_overclock or frameloop_normal).

So here is a patch proposal (tested):

Code: Select all

--- 8912.c	(révision 617)
+++ 8912.c	(copie de travail)
@@ -514,6 +514,8 @@
             ay->oric->cpu.write( &ay->oric->cpu, 0x3fb, 1 ); // ROMDIS
             setromon( ay->oric );
             m6502_reset( &ay->oric->cpu );
+            ay->oric->cpu.calcpc = ay->oric->cpu.pc;
+            ay->oric->cpu.calcop = ay->oric->cpu.read( &ay->oric->cpu, ay->oric->cpu.calcpc );
             via_init( &ay->oric->via, ay->oric, VIA_MAIN );
             ay->oric->auto_jasmin_reset = SDL_FALSE;
           }
@@ -526,6 +528,8 @@
             ay->oric->cpu.write( &ay->oric->cpu, 0x3fb, 1 ); // ROMDIS
             setromon( ay->oric );
             m6502_reset( &ay->oric->cpu );
+            ay->oric->cpu.calcpc = ay->oric->cpu.pc;
+            ay->oric->cpu.calcop = ay->oric->cpu.read( &ay->oric->cpu, ay->oric->cpu.calcpc );
             via_init( &ay->oric->via, ay->oric, VIA_MAIN );
             ay->oric->auto_jasmin_reset = SDL_FALSE;
           }

Hope this can help.

Personaly, I think the jasmin auto boot could be an option to keep the real Oric+Jasmin behavior.

Anyway, oricutron is a very useful tool.

User avatar
Chema
Game master
Posts: 2016
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Oricutron Jasmin auto-boot not working

Post by Chema » Tue Jul 15, 2014 10:52 pm

Hi Christian.

I am sure Xeron reads these threads, but I think it would be much better if you open a bug report in Oricutron's page:
https://code.google.com/p/oriculator/issues/list

Just in case...

And thanks to everybody supporting and helping Xeron (and Xeron himself, of course) for this fantastic emulator! I use it for development and it works like a charm :)

User avatar
iss
Flight Lieutenant
Posts: 476
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Oricutron Jasmin auto-boot not working

Post by iss » Wed Jul 16, 2014 8:19 am

Nice fix! I can confirm that above patch allows Oricutron to load Jasmin images.
( i.e. under Linux this works: $ ./oricutron -m 1 -k j -d disks/ftdos.dsk )
I'll wait day or two, if nobody commits the patch, I'll do it :)

Godzil
Squad Leader
Posts: 755
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: Oricutron Jasmin auto-boot not working

Post by Godzil » Wed Jul 16, 2014 9:34 am

Hum, I'm not sure if it's a good idea.. The jasmin boot button does not do a cold reset but a warm reset, it may rely on some BASIC stuff initialized, and directly jumping to the jasmin boot may cause problem at some point.

Have you intensively test your patch?

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Oricutron Jasmin auto-boot not working

Post by Xeron » Wed Jul 16, 2014 5:34 pm

Thanks very much for your patch! Awesome work tracking it down.

The separation of calculating cycles from actually performing the 6502 instruction does complicate things immensely, but greatly improves the cycle accuracy of the emulation.

I have done a slightly different change, which also recalculates the number of cycles for the instruction, but the fix is all down to your work!

BTW, if you are interested in commit access to the code, just send me a PM with the email address you use with google services.

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Oricutron Jasmin auto-boot not working

Post by Xeron » Wed Jul 16, 2014 5:36 pm

Godzil wrote:Hum, I'm not sure if it's a good idea.. The jasmin boot button does not do a cold reset but a warm reset, it may rely on some BASIC stuff initialized, and directly jumping to the jasmin boot may cause problem at some point.

Have you intensively test your patch?
The code in question does the correct boot for Jasmin, and RAM does not get cleared.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests