The QUILL

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

Re: The QUILL

Post by Dom »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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.
User avatar
Dom
Flying Officer
Posts: 141
Joined: Sun Nov 25, 2012 7:00 pm

Re: The QUILL

Post by Dom »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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?
User avatar
Dom
Flying Officer
Posts: 141
Joined: Sun Nov 25, 2012 7:00 pm

Re: The QUILL

Post by Dom »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: The QUILL

Post by Symoon »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: The QUILL

Post by Symoon »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: The QUILL

Post by Dbug »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

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: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: The QUILL

Post by Symoon »

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: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: The QUILL

Post by Chema »

Ah, yeah. Sounds reasonable. Thanks Symoon!
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: The QUILL

Post by Dbug »

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