Re: [hatari-devel] GEMDOS HD emulation, Hatari cartridge program load code and TT-RAM

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Thu, 9 Apr 2015 22:44:14 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On keskiviikko 08 huhtikuu 2015, Eero Tamminen wrote:
> > On keskiviikko 08 huhtikuu 2015, Eero Tamminen wrote:
> > > Ps. I hadn't yet time to check whether things work better
> > > from disk image (no Hatari cartridge code involved, program
> > > is loaded completely by TOS).
> > 
> > When using IDE disk image with Falcon emulation, program
> > is executed from TT-RAM.  I.e. problem is Hatari cartridge
> > code used for loading program for GEMDOS HD emulation.
> 
> I looked what the cartridge code does, and it just asks TOS
> to allocate/return pointer to new basepage + rest of memory
> with Pexec(PE_BASEPAGE, ...) call.
> 
> I assume that it should be changed to check program header for
> PRGFLAGS (long @ offset 0x16) bits and depending on those:
> 
> * If PF_TTRAMLOAD bit (1) is set, and there's "enough" TT-RAM:
>   - shrink the memory returned by Pexec() call to basepage size
>   - try Mxalloc(MX_PREFTTRAM) memory for program TEXT/BSS/DATA

The memory is allocated with Pexec5 ... so for supporting TT-RAM, I
think that should be Pexec7 instead.
Hmm, looking at the cart_asm.s code, this is slowly getting very ugly,
I guess the assembly logic has to be changed quite a bit for this (the
flags then have to be read-in before the pexec call, so you also need
a temporary buffer for this etc.). At least I currently don't have time
to do this ... so could you maybe add this item to the doc/todo.txt
list so that we don't forget about this?

 Thomas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/