Jump to content

Photo

Alternate Reality : Dungeon image?


88 replies to this topic

#51 evilmoo OFFLINE  

evilmoo

    Chopper Commander

  • 143 posts

Posted Sun Aug 20, 2017 6:58 AM

It's been a long time since I looked at the code, but perhaps it's possible to edit the "directory" and the relevant code so that it supports sectors over 720.  Then you could just set everything to disk 1 side 1 and change the starting sector number for each overlay.



#52 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Sun Aug 20, 2017 8:24 AM

:D If only so straight forward...

To the most part (after the intro) a table used to obtain files by their id.
This is handled in the new model the disk/side byte is manipulated to 'bump' the hi-byte of the sector requested.

A few parts of the code however bypass the table and set load detail directly, so those need to be individually patched.

 

What seems to be happening in the encounter overlay is that part of this is internal encoded 'again' and so decoded after the overlay has been loaded, so an extra precaution against tampering by the developers.

 

I'm now building the disks 2 & 3 from the sources (the boot disk not yet building the same) and so I can exchange those into my image and see how that goes.



#53 leech OFFLINE  

leech

    Stargunner

  • 1,310 posts

Posted Sun Aug 20, 2017 9:16 AM

Wow this is nuts, so someone disassembled the code and threw it up on github years ago?

 

Now I'm wondering on the possibility of a VBXE / ultimate 1mb enhanced version... :)

 

But yeah, let's first get it to be a 1 image to rule them all type thing.  I'm betting it would be a pain, but how cool would it be to merge City/Dungeon together so it was seamless? 



#54 Gunstar ONLINE  

Gunstar

    Gunstar

  • 9,710 posts
  • Location:Kellyville, Oklahoma

Posted Sun Aug 20, 2017 12:17 PM

but how cool would it be to merge City/Dungeon together so it was seamless? 

Unfortunately this cannot ever be done without a complete re-write of one or the other as they are vastly different since Philip Price didn't program The Dungeon and they just totally programmed it a different way, totally different graphics engine, I believe. That's why they came up with that "hack job" way of transferring The City character to the dungeon, even disposing of much of what your City character is, except for a few stats, etc.



#55 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Sun Aug 20, 2017 12:40 PM

I've done some cleaning up of where I'm at and so thought I'd let people have something to 'play' with.

Ultimately it is a bit useless as an Encounter will invariably cause a crash.

However it could let others have a look and perhaps help with progressing this.

 

In Altirra, I'm setting a breakpoint at $190 and when this is hit I add this code:

e $190 AD 05 19 4A 29 0E 8D 33 02 4A 6D 33 02 6D 04 19 60
 
the breakpoint can be cleared and then F8 to resume,
 
You can watch the intro, create a new character, enter the dungeon, walk around, enter a shop / pub etc and exit back to the dungeon.
 

Attached Files



#56 leech OFFLINE  

leech

    Stargunner

  • 1,310 posts

Posted Sun Aug 20, 2017 2:23 PM

Unfortunately this cannot ever be done without a complete re-write of one or the other as they are vastly different since Philip Price didn't program The Dungeon and they just totally programmed it a different way, totally different graphics engine, I believe. That's why they came up with that "hack job" way of transferring The City character to the dungeon, even disposing of much of what your City character is, except for a few stats, etc.

I'll probably start up another thread about this... but the scope of the game was pretty epic originally, maybe one day I'll get to be a good enough of a coder to join up with one of the other AR projects out there, what I'd like to see is the Arena, Wilderness, etc completed... having the code from the dungeon, and maybe re-write the city as you suggest could be possible / awesome as well.



#57 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Sun Aug 20, 2017 4:35 PM

 

Ultimately it is a bit useless as an Encounter will invariably cause a crash.

 

 

Well, just like a semi-colon in a bit of javascript, just one byte can make a lot of difference :)

 

The loading of monster data was doing some decoding that doesn't need to take place and so I was able to skip over it.

 

Now the encounter loads (not that I got a hit in during my first fight with a ghost!)

 

Enjoy,

Mark

 

(So the next task is to work out how and where to hook in the sector bump)

Attached Files



#58 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Mon Aug 21, 2017 7:08 PM

Say it doesn't matter ain't nothin' gonna alter the course of my destination.

 

Sector bump code plumbed in without a hitch and so this ATR image should be the first that's playable directly on an SIO2SD / APE link or equivalent.

 

That should just leave as the 'to-do' all the work in relation to self-containing character disk management into the ATR.

 

Attached Files



#59 Wilheim ONLINE  

Wilheim

    Chopper Commander

  • 208 posts

Posted Mon Aug 21, 2017 7:58 PM

Great work! Thank you so much for your effort!

One question: is it possible to convert the atr image into an atarimax cartridge? I think it would be useful also. Also, the last banks can be used to save characters. Don't you think?

#60 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,894 posts
  • Location:Australia

Posted Mon Aug 21, 2017 8:45 PM

I think the game writes to some of the disks which would be a problem.

Atarimax uses 16K blocks (?) and they take some time to read then write back.



#61 Wilheim ONLINE  

Wilheim

    Chopper Commander

  • 208 posts

Posted Mon Aug 21, 2017 9:15 PM

I think the game writes to some of the disks which would be a problem.

Atarimax uses 16K blocks (?) and they take some time to read then write back.

 

I think that The City writes somethin, not the Dungeon.

 

Also, I think that regardless the block size, you can use one block to write one save state and nothing more. I think there would be a lot of space on the cartridge.



#62 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,894 posts
  • Location:Australia

Posted Tue Aug 22, 2017 1:07 AM

Yeah, I wasn't worried too much for save games as it's a one-off.  You could just use the 2K or whatever and leave the rest of the block blank.

 

But if ingame does have writes it makes using flashcart a bunch harder.



#63 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Tue Aug 22, 2017 1:52 AM

In theory, an AR: Dungeon cart could be done with an AtariMax 8Mbit board.
This game disks total ~490KBytes and so would be stored on one Am29f040 chip.
The character saves would then fit on an Am29f010 in the other chip slot. (This works as I've experimented with it in the past) 
This is better because the bank erase size on the smaller chip is 8KB rather than the 64KB of the '040, which would give an ample 16 slots.
 
There is, however, still a degree of work involved there replacing the sector load and character read/write routines to access the cart rather than disk.


#64 Sheddy OFFLINE  

Sheddy

    Dragonstomper

  • 760 posts
  • Location:UK

Posted Tue Aug 22, 2017 2:07 AM

Are you sure the Atarimax 8Mbits always have both chip types? I think it might be a bit of a lottery as to what chip types you end up with, or whether they are high or low memory. I hope I'm wrong as that would be very useful!

Edited by Sheddy, Tue Aug 22, 2017 2:25 AM.


#65 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Tue Aug 22, 2017 2:31 AM

A purchased 8Mb board would be two '040s but that doesn't stop you from putting the others in there.
I recall writing a little test app to exercise what happened to the Am29f010 when on that board and IIRC if you keep the bank selections to the first 16 then you're ok.
I think the others simply loop back but can recall if $80 or the $20 bit was for bank disable.



#66 Sheddy OFFLINE  

Sheddy

    Dragonstomper

  • 760 posts
  • Location:UK

Posted Tue Aug 22, 2017 11:08 AM

Oh, I see what you mean - The 10 is usually in the 1Mb Atarimax

#67 WIZZARD77 OFFLINE  

WIZZARD77

    Moonsweeper

  • Topic Starter
  • 260 posts
  • Location:LaCrosse,WI

Posted Tue Aug 22, 2017 1:43 PM

This works great Thanks. I used rel3 with a character disk in drive 2 and it works flawlessly so far. I'll let you know if I come across any bugs.



#68 Wilheim ONLINE  

Wilheim

    Chopper Commander

  • 208 posts

Posted Tue Aug 22, 2017 2:00 PM

Clever idea! Do you know how much how much memory a save state does it take? Considering a disk side contains 4 save states, I think it would be no more than 22 Kbytes.



#69 evilmoo OFFLINE  

evilmoo

    Chopper Commander

  • 143 posts

Posted Thu Aug 24, 2017 6:56 AM

If I remember correctly, the code looks for [SELECT] being pressed on boot, and will skip the 64K/128K initialization.  If this is the case, you could force it to 48K every time, and then jump to the ROM SIO vector after some byte shuffling.

 

Just a thought.



#70 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Thu Aug 24, 2017 8:05 AM

This still can't be done as, IIRC, all of the memory areas used by ROM SIO have been used for other purposes, for example $232.w is now the sector offset and this error mirrors what you'd normally see around $300 and these are transferred to zero page locations before issuing them as Serial Out bytes. As with titles like The Eidolon and Koronis Rift, SIO handling routines resembling those in the OS were implemented. AR:City took that to another level whereas the Dungeon is simpler.



#71 remowilliams OFFLINE  

remowilliams

    Quadrunner

  • 10,585 posts
  • Location:Detonation Boulevard

Posted Thu Aug 24, 2017 8:35 AM

Sector bump code plumbed in without a hitch and so this ATR image should be the first that's playable directly on an SIO2SD / APE link or equivalent.

 

This is sooooo awesome.  I loaded it up on my 800 yesterday and did a happy dance  \o/

 

Well I forgot to mount a character disk, but still - happy dance!   :D



#72 Rybags OFFLINE  

Rybags

    Quadrunner

  • 15,894 posts
  • Location:Australia

Posted Thu Aug 24, 2017 9:27 AM

Doesn't Dungeon have concurrent SIO and sfx/music?  I'm sure encounters at the least do that.



#73 Wilheim ONLINE  

Wilheim

    Chopper Commander

  • 208 posts

Posted Thu Aug 24, 2017 4:54 PM

Afaik, the dungeon doesn't play music during loads. Only the city. Nevertheless, that doesn't mean that is not capable.

#74 Wilheim ONLINE  

Wilheim

    Chopper Commander

  • 208 posts

Posted Thu Sep 7, 2017 9:37 AM

Hi, Wrathchild!

 

I tested the Dungeon disk image for a while with APE, and it seems to work fine, thanks! Do you think is possible to make a cartridge version from this image?

 

Thank you and best regards!


Edited by Wilheim, Thu Sep 7, 2017 9:37 AM.


#75 Wrathchild OFFLINE  

Wrathchild

    River Patroller

  • 2,123 posts
  • Location:Reading, UK.

Posted Thu Sep 7, 2017 11:05 AM

Thanks, sadly progress has been on hold for a couple of weeks as some unnecessary nonsense was taking up my time.  :mad:

 

I did have a chance to play for a bit at the w/e but have seen the "Enter Disk 3 Side 1" when I'd not expect too, so there is some more debugging to do.

 

The char disk management commands use direct serial commands too and the new disk setup is fixed to drive one and issues a format command. Due to the nature of the single disk image much of the menuing text can be altered to make more sense and will permit me to reuse that to have a loop to blank the sectors instead.

 

So to answer your question, no, the disk image can't be put onto cart as it still issues serial commands and reads back the response to fill the sector buffer.

 

However, one the other issues have been sorted out with the disk image then, as I had started with the AR:City cartridge, adding routines to redirect to the sector read calls to get memory from the cart banks instead should be possible.

 

It would be nice to perhaps do a crowd-funding thing to back the cart ports but obviously the recent "Games for Atari: 1977 to 1995" highlights that other's copyright has to remain a consideration.  :(






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users