The QUILL

Want to talks about games you like, would like to see developed on the Oric, it's here.
Dom
Officer Cadet
Posts: 46
Joined: Sun Nov 25, 2012 7:00 pm

Re: The QUILL

Post by Dom » Sat Feb 29, 2020 6:06 pm

Quilled games make a checksum while loading and reboot the oric in case of problem. What is strange in this case, is that it loads when on emulator.....
Which game do you try to load on erébus?

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

Re: The QUILL

Post by Chema » Sat Feb 29, 2020 8:19 pm

It is a new game. The authors asked me for help with the Oric port. I also tested loading the game from disk and it worked on the real machine.

Dom
Officer Cadet
Posts: 46
Joined: Sun Nov 25, 2012 7:00 pm

Re: The QUILL

Post by Dom » Sun Mar 01, 2020 9:08 pm

If the checksum control is not Ok, the reboot of the oric is made by the instruction at the following adress,
$13F0 : JMP(FFFC).
If you replace this instruction by
$13F0 : RTS , It should work....
But that will not explain why it works on emulator and not with the erebus :roll:

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

Re: The QUILL

Post by Chema » Sun Mar 01, 2020 11:01 pm

Dom wrote:
Sun Mar 01, 2020 9:08 pm
If the checksum control is not Ok, the reboot of the oric is made by the instruction at the following adress,
$13F0 : JMP(FFFC).
If you replace this instruction by
$13F0 : RTS , It should work....
But that will not explain why it works on emulator and not with the erebus :roll:
And even more... why it does not fail on the disk version in a real Oric... could Erebus be interfering? Some register or address without the expected value after loading?

Dom
Officer Cadet
Posts: 46
Joined: Sun Nov 25, 2012 7:00 pm

Re: The QUILL

Post by Dom » Sun Mar 01, 2020 11:16 pm

why it does not fail on the disk version in a real Oric
I think I (maybe) can answer this question.
The patch I made to build disc versions of Quilled Games changes the
$13F0 : JMP(FFFC).
in
$13F0 : RTS

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

Re: The QUILL

Post by Chema » Mon Mar 02, 2020 8:36 am

Ah, so there may be a problem with the checksum... interesting. I wonder now about the difference between the emulator and a real Oric.

Thanks!

User avatar
Symoon
Archivist
Posts: 1861
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: The QUILL

Post by Symoon » Mon Mar 02, 2020 12:50 pm

When I transferred Krystal Worlds 1, I'm 100% sure it worked on both real Oric and emulator (by audio tape)

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

Re: The QUILL

Post by Chema » Mon Mar 02, 2020 3:17 pm

Symoon wrote:
Mon Mar 02, 2020 12:50 pm
When I transferred Krystal Worlds 1, I'm 100% sure it worked on both real Oric and emulator (by audio tape)
Did you try with Erebus?

There is a high probability that my tap version is wrong somehow, as I converted it from an ort file and had to do some ugly things... I have to check that there are no extra or missing bytes at the end, for example.

User avatar
Symoon
Archivist
Posts: 1861
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: The QUILL

Post by Symoon » Tue Mar 03, 2020 10:09 am

Chema wrote:
Mon Mar 02, 2020 3:17 pm
Symoon wrote:
Mon Mar 02, 2020 12:50 pm
When I transferred Krystal Worlds 1, I'm 100% sure it worked on both real Oric and emulator (by audio tape)
Did you try with Erebus?
Will do, don't hesitate sending a reminder (short evenings, quite tired, main internet connexion out of order, ... Life!)

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

Re: The QUILL

Post by Chema » Tue Mar 03, 2020 10:48 pm

I just tried with Krystal Worlds with Erebus and the same symptoms: it loads, pauses for a while, and reboots. So it must be an incompatibility between the Quill checksum routine and Erebus.

In any case, patching the game as Dom suggested did the trick.

Thanks!

User avatar
Dbug
Site Admin
Posts: 3286
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: The QUILL

Post by Dbug » Wed Mar 04, 2020 5:35 pm

Could it be something as stupid as some off by one error when loading data or computing the checksum?

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

Re: The QUILL

Post by Chema » Wed Mar 04, 2020 6:06 pm

Dbug wrote:
Wed Mar 04, 2020 5:35 pm
Could it be something as stupid as some off by one error when loading data or computing the checksum?
Could be, but as Dom had to patch the files to make them work when loaded from disk, I am starting to think the routine either relies on a memory/register value after loading (which only occurs if you do a real loading from tape), or maybe it includes values from the ROM content in the routine (maybe as a copy protection scheme against patched ROMs, which is something done by both Erebus and Sedoric, I guess - but I am not sure to what extent in the latter).

User avatar
Symoon
Archivist
Posts: 1861
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: The QUILL

Post by Symoon » Thu Mar 05, 2020 2:05 am

The Quill loading checksum code goes reading the tape header in RAM (in $005D for ROM 1.0 or $02A7 for ROM 1.1, Erebus being using ROM 1.1).
In this header, it reads start and end addresses of the loaded file. Then it loops reading all loaded bytes, adding each and every byte to the previous loop result.
Once this done, it compares the result to a (loaded from tape) result in memory (in $2A8, $2AF and $2B0). If different: reset!

I suspect Erebus doesn't load the tape header at the same location than the ROM tape routines do, hence the checksum doesn't compute the right bytes and Oric reboots?

Dom's modification inhibits the reset (which apparently is only called for this purpose).

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

Re: The QUILL

Post by Chema » Thu Mar 05, 2020 12:30 pm

Ah, yeah. Sounds reasonable. Thanks Symoon!

User avatar
Dbug
Site Admin
Posts: 3286
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: The QUILL

Post by Dbug » Thu Mar 05, 2020 12:55 pm

Which brings the question of Erebus' firmware updates: I wonder is a Erebus 2.0, instead of having a EPROM, could just implement the overlay signal, and load to overlay memory a 16k ROM file that could then be patched by just changing the file on the SD card?

Post Reply