[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System identification from Applesoft?



Le mercredi 13 février 2013 23:42:20 UTC+1, Antoine Vignau a écrit :
> Benoît,
> 
> what is the need to switch to pure 16-bit before calling IDROUTINE?
> 
> av

I mean, 18 20 1F FE 90 IIgs or B0 notIIGS (sorry), should be sufficient to differentiate //e from IIgs.
Do we need more? ROM version (in Y), etc. ?

...

Read code, all registers are 16-bit wide but upper byte is not used, therefore your code is good.

...

I've learned something today, thank you :-)

av

* Identification bytes for CORTLAND
*
* REGIDz's are return'ed when the user JSR's to $FE1F.
*
* REGIDA = Bit 15 = reserved
*          Bit 14 = reserved
*          Bit 13 = reserved
*          Bit 12 = reserved
*          Bit 11 = reserved
*          Bit 10 = reserved
*          Bit 09 = reserved
*          Bit 08 = reserved
*          Bit 07 = reserved
*          Bit 06 = 1 if system has a memory expansion slot
*          Bit 05 = 1 if system has an IWM port
*          Bit 04 = 1 if system has a built in clock
*          Bit 03 = 1 if system has front desk bus
*          Bit 02 = 1 if system has SCC built in
*          Bit 01 = 1 if system has external slots
*          Bit 00 = 1 if system has internal slots
*
* REGIDX = Bit 15 = reserved
*          Bit 14 = reserved
*          Bit 13 = reserved
*          Bit 12 = reserved
*          Bit 11 = reserved
*          Bit 10 = reserved
*          Bit 09 = reserved
*          Bit 08 = reserved
*          Bit 07 = reserved
*          Bit 06 = reserved
*          Bit 05 = reserved
*          Bit 04 = reserved
*          Bit 03 = reserved
*          Bit 02 = reserved
*          Bit 01 = reserved
*          Bit 00 = reserved
*
* REGIDY = Bit 15-8 = machine id byte
*                  0 = Cortland
*                  01-FF = future systems
*          Bit 07 = 0
*          Bit 06 = 0
*          Bit 05 = 0
*          Bit 04 = 0         Bits 00-07 = ROM version number
*          Bit 03 = 0
*          Bit 02 = 0
*          Bit 01 = 0
*          Bit 00 = 1   

REGIDA		DC.W	$007F	;Register identification byte
REGIDX		DC.W	$0000	;Register identification byte
REGIDY		DC.W	$0003	;Register identification byte