News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_keith56

how do I detect a CPC plus in assembly?

Started by keith56, 10:30, 13 December 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dragon

#25
Quote from: Ast on 14:12, 23 January 17
Please give me more informations about what you're writing because i don't really understand...


Detecting The rom7 or basic to know if you have a gx4000 or not will not Work...
Because all cpr rom are empty in The beginning.
If you're making some game, demo, tool, working on The range plus (in cartridge format), these roms won't be present !


O.k explain  the theory of all better.

Taking this from arnold v specification revised.: Executing from cartridge (only 6128+ 464+ and gx4000 posibility).

"On an unmodified GX4000, selecting logical page 7 using DFxx doesn't select physical page 3, instead it selects physical page 1. The appropiate hardware is not activated as it is on 464 and 6128."

So my theory is,If you made a game or program in cartridge, you know what data is in the rom. So if you mount logical id 07 and the content is equal to pysicall id 1 in cartridge, you have a gx4000. If not you have a 464+ or 6128+

And 464+ or 6128+ can be filtered  cheking if fdc is present.

The utilitiy of this is my laser squad cartridge(for example).gx4000 detected->not save,464+ detected load save in tape,6128+ detect load save from disc.

The part of normal range is mostly a joke,  The old cpc have keyboard atribute clash. I mean if you press up right in pad 1 and up only in pad 2, cpc detects player 2 has been pressed right to, as the plus have diodes it detect only up :) .


But in seriusly mode. I think now, that pysicall id only exist in the plus range, old cpc have only logical ids to select roms, so maybe this can  be a way to diference between plus and normal?.

@arnoldemu yeah, is was i telll +-

arnoldemu

For 464plus or 6128plus why need to check special? Why not check extra ram or detect fdc?

detect extra ram (same as on cpc). You poke to 4000, try 7fc4, poke to 4000, 7fc0, then check 4000. If extra ram byte doesn't change.

detect fdc: amsdos rom for plus has this code.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Yes the physical cart page number and logical page numbers exist on plus.

On CPC you don't see this.

To detect CPC or Plus, you can use PPI test OR page in registers and write data and read it back.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: dragon on 09:42, 23 January 17
You can detect a 6128+  or 464+ /gx4000 detecting the fdc controller, But is possible detect the cassette?. To diference between 464+/gx4000?. I speak about only plus range, executing  the Code from cartridge.
Detecting cassette: I can't think of a method that would work.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Ast

Detecting gx4000 using basic rom or amsdos won't work !
There is no basic rom or amsdos in cartridge you made. You don't need it.
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

arnoldemu

Quote from: Ast on 14:54, 23 January 17
Detecting gx4000 using basic rom or amsdos won't work !
There is no basic rom or amsdos in cartridge you made. You don't need it.
correct.

I think @dragon means the basic page or amsdos page (page 1 and 3).

You can detect gx4000 by setting the rom using logical page number, then use physical number. On GX4000 logical page 7 doesn't activate physical page 3. On 6128Plus and 464Plus logical page 7 *DOES* activate physical page 3.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

dragon

Quote from: arnoldemu on 14:43, 23 January 17
For 464plus or 6128plus why need to check special? Why not check extra ram or detect fdc?

detect extra ram (same as on cpc). You poke to 4000, try 7fc4, poke to 4000, 7fc0, then check 4000. If extra ram byte doesn't change.

detect fdc: amsdos rom for plus has this code.

Yeah it do it now!. My last version detect if you have fdc with amsdos code  :) I only left make the support for 464+ tape, now that cdt has been dumped i can do it extracting the original subrutine from the cdt.


Quote from: arnoldemu on 15:03, 23 January 17
correct.

I think @dragon means the basic page or amsdos page (page 1 and 3).

You can detect gx4000 by setting the rom using logical page number, then use physical number. On GX4000 logical page 7 doesn't activate physical page 3. On 6128Plus and 464Plus logical page 7 *DOES* activate physical page 3.



Thats it, is question about diference beetwenn pysicall pages and logicall pages.

The old cpc range have only logical pages to select the upper rom, basic and amsdos are in the 0 and 7. Plus have that, but apart from that it have pysicall id.

The logical pages in the plus  0,7 are redirected to the pysical 1,3 by the hardware for basic and amsdos compatibility.

The pysicall pages are the cartridge pages from 0-31

In the gx4000 the hardware part that redirects the 7 logical to the 3 pysicall is not installed, so it redirect to 1.

If write  df00 you calll logical id page 0
If write  df80 you call pisicall id page 0.

when bit 7 is 0,L logical id are called, when is 1,x,x,p pysicall id are called.

If i understand it o.k

Powered by SMFPacks Menu Editor Mod