Roberto Pinna wrote:

>Indeed... if you use B or BC you should push it, but what if you don't??
>(grin!)
>
>As far as I know $FD9F (H.TIMI), 'corrupts' not only BC, but as far as I
>know all registers, except IX, IY, and the shadow registers. If you
>really need them afterwards...... push everything on the stack.

It's not a question of using B afterwards, B is the loop counter!


MkII wrote:

>Killing interrupts or RETing #FD9F (at least someone who also uses #
>instead of h!) causes spinning-forever drive motor 8:(

I suggested killing interrupts during disk loading, not full-time.

And about RETting #FD9F, it's very easy to solve: simply copy the 5 bytes
of the hook entry to some memory location and then call that 256 times
after you're done loading.
But #401F is a nicer way, although it's more difficult.

A warning in advance: DOS2's disk change feature won't function well if the
interrupt routine is not called. Usually, it counts the time after a disk
access. Since it is physically impossible to swap a disk in less than about
a second, it's safe to assume the disk isn't changed if the last access is
more recent. But if you stop calling #FD9F, time will be "frozen" for DOS2
and it won't detect disk changes at all.
Ofcourse, for ESE-RAM this is not a problem, but for floppy it is. To solve
it, invalidate the DOS2 disk buffers (sector cache) using the BDOS call for
that purpose.

>Also, I'm planning to play background music while loading, so I need
>standard interrupts enabled.

Good luck! Playing music while loading is very difficult...

The reason: almost all DiskROMs turn off the interrupt for long periods
during loading. So unless you're willing to write custom FDC drivers (and
mail them to the UZIX team ;), you'll have to cope with long intervals
between interrupts.

You could make special music that still sounds nice when played while loading.
NOP played some kind of "music" while loading in Unknown Reality.
And for Almost Real we had a part planned where MSX-AUDIO ADPCM samples
were played while loading, using NOP's SampBox format. This "required" 256K
of sample RAM: the 32K version was very boring. This part didn't make it
into the released version, because it took too much disk space, required
non-standard hardware (256K sample RAM) and it needed debugging.

>>That's because the SONY DiskROM has a different "algorithm" for the drive
>>LED: it only turns on when that drive is selected. This is not connected to
>>the slowdown.
>
>I see. The light is unlit after loading but the motor is still spinning.

The motor does stop spinning automatically (by hardware), but not at the
same time as the LED goes out.

>Yeah. Now I'd like to know the actual causes of the slowdown. What does the
>interrupt do in a F700 to slow it down 400%?!?!?!?!?

Just an idea: maybe it's only a bit too slow. If it is called inbetween
sectors and doesn't return in time, the next sector will have passed the
head and the DiskROM will have to wait nearly a full rotation.
If this is true, an interleaved-formatted disk would be about equally fast
on a F700 and on for example a 8250.

Or maybe the F700 DiskROM turns on interrupts more frequently than other
models? You could measure this by installing a counter on #FD9F or #FD9A
and see how much counts it gets while loading a fixed amount of data on a
F700 and on a 8250 (take the average over a few runs).

Bye,
                Maarten


****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to