Improved "The Hobbit"

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Xeron wrote: Tue Mar 15, 2022 10:16 pm Tape saving/loading in Oricutron was ways the weakest part. I was never happy with the tape code, so it may be the fault of the emulator.
Fair enough.

Basically, I'm trying to get a working way to get the game save and reload data without any of my modifications, because for all I know, I'm trying to port to disk something that actually is already broken :D
User avatar
Symoon
Archivist
Posts: 2310
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Improved "The Hobbit"

Post by Symoon »

Tried with Euphoric's hardware tape, and it worked ;)
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Symoon wrote: Wed Mar 16, 2022 8:46 am Tried with Euphoric's hardware tape, and it worked ;)
Does that save some special format?
Basically I'd like to get the exact byte stream written by the program so I can compare if the buffer I got is similar.
User avatar
Symoon
Archivist
Posts: 2310
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Improved "The Hobbit"

Post by Symoon »

Dbug wrote: Wed Mar 16, 2022 8:57 am Does that save some special format?
Basically I'd like to get the exact byte stream written by the program so I can compare if the buffer I got is similar.
I have no idea (hardware tape avoids having to think about that), but I'll check if it kept the saved WAV file.
User avatar
Symoon
Archivist
Posts: 2310
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Improved "The Hobbit"

Post by Symoon »

It also worked with Euphoric in .TAP format.
Here are both results (both saved just after going EAST at the beginning).

From what I quickly saw, the signal is using slow speed, but the header is not standard, at least for the data type ($50 when accepted values are $80 for memory, $40 for table, $00 for basic).
hobbit_save.zip
(29.56 KiB) Downloaded 155 times
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Ok, so I compared what you saved with my own "save to a buffer in memory", there are some differences (mostly the 16 16 16 16 sequences) and some changes here and there (possibly because the game is real time with some random stuff happening all the time), but in term of actual content, that sounds to be pretty similar.
image_2022-03-16_134526.png
Maybe I should just patch the "read byte" and "write byte" in the ROM so they call my own code, and let all the existing sync/read/write/via/headers code as is.
User avatar
Chema
Game master
Posts: 3019
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Improved "The Hobbit"

Post by Chema »

Dbug wrote: Wed Mar 16, 2022 1:47 pm Ok, so I compared what you saved with my own "save to a buffer in memory", there are some differences (mostly the 16 16 16 16 sequences) and some changes here and there (possibly because the game is real time with some random stuff happening all the time), but in term of actual content, that sounds to be pretty similar.

image_2022-03-16_134526.png

Maybe I should just patch the "read byte" and "write byte" in the ROM so they call my own code, and let all the existing sync/read/write/via/headers code as is.
That's a sound idea, in my opinion. It will also make savegames somewhat "compatible". You said you don't have the DOS available? That is a pity, as complicates things a bit to handle files.

You are doing a very nice job here, Dbug. Congratulations!
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Not sure about the nice job, but at least I'm learning some stuff, I now understand the complicated push/pop madness, it's just a compact way to encode parameters while totally fucking up the disassembly and normal ways of tracing the code.

User avatar
iss
Wing Commander
Posts: 1642
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Improved "The Hobbit"

Post by iss »

Well done!
This way to pass parameters to subroutines is not so rare. Woz's Sweet16 uses it.
And indeed debugging is nightmare :).
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Still digging, I used what I found yesterday to identify in the code the blobs of text, I add labels on things I identify, should make digging in the stuff much easier, and looks like by the time I'm done we will have a full commented The Hobbit game engine :cry:

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

Re: Improved "The Hobbit"

Post by Chema »

Do you know that I helped a bit with the disassemble of the spectrum version? It was for the Dragon 32 conversion.

All the thread and documentation is in Spanish, and it is Z80 code, but may be of use??

There is a zip file with commented source code in the last post of this thread http://retrowiki.es/viewtopic.php?f=84& ... p200065672

And the forum for the project is http://retrowiki.es/viewforum.php?f=84
User avatar
coco.oric
Squad Leader
Posts: 720
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: Improved "The Hobbit"

Post by coco.oric »

"Do you know that I helped a bit with the disassemble of the spectrum version? It was for the Dragon 32 conversion.
All the thread and documentation is in Spanish, and it is Z80 code, but may be of use??"
Ouch, this project is very impressive
@dbug : looking at some post, i've discovered this adress : http://www.icemark.com/dataformats/hobbit/

May be you've not found it up to now and it seems to be quite detailed to understand hobbit data tables
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

I'll probably use these resources to cross reference with what I find.

Most Oric games are code driven, that one is mostly data driven, which indeed means that understanding the file format is important :)
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

Some progress on the saving code, no idea why they did it that way, that seems uselessly complex without any specific size win there.
User avatar
Dbug
Site Admin
Posts: 4460
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Improved "The Hobbit"

Post by Dbug »

No new progress to report on the save part, but somebody on the youtube video asked if it would be possible to disable the new font, so here it is, a version 1.7 that allows toggling the font independently of the rest, so technically you can now play the fast version with the original ROM font, or the old version with the fancy font.

Here is the new version:
ImprovedHobbit_v1.7.dsk
(150.25 KiB) Downloaded 213 times
Additionally, there's also a small dark blue "v1.7" displayed on the title screen, should help tracking which version you have.

As usual, the source code changes are on the repository:
https://osdn.net/projects/oricsdk/scm/svn/commits/1580
Post Reply