> > - Obtain the slot currently switched on page 1 by reading the slot
> > selction register, connecting the slot of page 1 into page 3 and reading
> > address #FFFF. Save this slot+subslot value on OLDSLOT.
> You should ofcourse complement what you read from #FFFF. I assume your code
> does, but you didn't mention it here.
Yes, I complement the read value; I assumed it was understood.
> > - Save contents of work area #FCC5 to #FCC8 (the sublot registers
> > saving area) as OLDSUB
> What are these for, anyway?
I though that maybe the code on the disk ROM performs some illegal (but
working) slot switching, not using this work area or using it in any
strange way; so I decided to better save these values and leave them as
they were, before returning control to the main code. BTW I tested also
without touching this work area, and the result is same.
> > - Switch NestorMan slot on page 1 with ENASLT
> Watch out: ENASLT does an EI.
What? According to Technical Handbook, ENASLT finishes in DI state.
Anyway I do an EI after the ENASLT.
> Since you store values on fixed addresses, the interrupt handler is not
> re-entrant. You have to guard against interrupt-within-interrupt. The
> previous code you sent to the list did that (interrupt in progress flag).
I had also though on this. When the timer interrupt service routine is
called, it checks a flag. If the flag is 1, it finishes immediately. If
it is 0, sets it to 1 and does the work, and after finishing, the flag
is set to 0 again. This prevents the "interrupting the interruption"
problem. And of course, the flag checking and setting code is enclosed
between a DI and an EI.
All the problems come when switching page 1. No problem at all when
doing the same with page 2. That's very odd.
*** XX BARCELONA MSX USERS MEETING: DECEMBER 8TH, 2001 ***
------------------------------------------------------------------------------------------------------
Konami Man - AKA Nestor Soriano (^ ^)v
Itsumo MSX user
[EMAIL PROTECTED]
http://www.konamiman.com
Kyoko Koizumi home page (under construction):
http://www.geocities.com/tamachan1976/index.html
------------------------------------------------------------------------------------------------------
--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html