ATM TURBO 2+ - trdos/memory paging

Postby VELESOFT » 13 Dec 2009, 03:56

I need use TRDOS from ATM TURBO 2+ (trdos with FDC ports emulation - work with ramdisc) on real ZX Spectrum 128+2 with my PROFI INTERFACE:
http://zx.pk.ru/showthread.php?t=11479


This interface emulate memory paging of russian ZX "clones". What features and ports must be implemented for possibility run ATM TRDOS on original ZX 128 ?
My interface can support memory paging in full adress space 64kB, allram mode, 1MB ram , etc. But full emulation of ATM TURBO 2+ is impossible.
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby deathsoft » 13 Dec 2009, 13:42

This is full description of ATM2 ports (but in russian) http://atmturbo.nedopc.com/atmdscr.htm

ATM2 paging use two potrs set: "system" port and "memory manager" ports

system port have base address 0xFF77 but it use tricks in decoding port address - some of address bus bits used as data bits (to simplify decoding circuit).
D2,D1,D0 - select video mode (you do not need this)
D3=1 - enable turbo (you do not need this)
D4-reserved
D5-enable int from vsync (you do not need this)
D6,D7 - used for pc keyboard controller (you do not need this)
A8=0 - enable memory manager (when computer powers on memory manager is disabled)
A9=0 - activate all shadow ports
A14=0 - activate palette (you do not need this)

memory manager port (base address 0xFFF7):
D5..D0 - page number (0-63) (all bits must be inverted)
D6=1 - RAM, 0 - ROM
D7=1 - use 0x7FFD in address decoding (in memory range 0xC000-0xFFFF D2-D0 used from 0x7FFD instead of memory manager)
A15..A14 - select memory bank (0..3)
0 0 - 0x0000-0x3FFF (port 0x3F77)
0 1 - 0x4000-0x7FFF (port 0x7F77)
1 0 - 0x8000-0xBFFF (port 0xBF77)
1 1 - 0xC000-0xFFFF (port 0xFF77)

All of this ports are shadowed in trdos space, you need to activate this ports via 0x3d2f entry point by writing A9=0 to system port.

PS. I look at vg93emul source code and see that it uses port 0xEF(hdd port) to load data from hdd. To adapt this to others zx clones you need to modify this code (talk to CHRV and ask him for source code of vg93emul).
Last edited by deathsoft on 13 Dec 2009, 14:10, edited 1 time in total.
User avatar
deathsoft
 
Posts: 4744
Joined: 07 Apr 2007, 00:58
Group: Registered users

Postby VELESOFT » 13 Dec 2009, 18:45

deathsoft wrote:PS. I look at vg93emul source code and see that it uses port 0xEF(hdd port) to load data from hdd. To adapt this to others zx clones you need to modify this code (talk to CHRV and ask him for source code of vg93emul).


Yes, if this TRDOS contain complette IDE driver, it's possible replace with IDE driver for european IDE interface (DIVIDE IDE ports : http://velesoft.speccy.cz/zx/divide/doc ... del-en.txt )
This trdos can work also only with ramdisc = can work without IDE ports.

I need info, if this trdos need more than one rom page and more than one ram page (use ram page #38 in area #16384-#32767)

see code at adress #376E in TR-DOS rom:
LD A,#47
OUT (#F7),A ;set page #38 from adr. 16384
....
....
LD A,#7A
OUT (#F7),A ;set page #5 from adr. 16384
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby VELESOFT » 19 Dec 2009, 02:57

deathsoft wrote:memory manager port (base address 0xFFF7):
D5..D0 - page number (0-63) (all bits must be inverted)
D6=1 - RAM, 0 - ROM
D7=1 - use 0x7FFD in address decoding (in memory range 0xC000-0xFFFF D2-D0 used from 0x7FFD instead of memory manager)
A15..A14 - select memory bank (0..3)
0 0 - 0x0000-0x3FFF (port 0x3F77)
0 1 - 0x4000-0x7FFF (port 0x7F77)
1 0 - 0x8000-0xBFFF (port 0xBF77)
1 1 - 0xC000-0xFFFF (port 0xFF77)


??? This is correct:
A15..A14 - select memory bank (0..3)
0 0 - 0x0000-0x3FFF (port 0x3FF7)
0 1 - 0x4000-0x7FFF (port 0x7FF7)
1 0 - 0x8000-0xBFFF (port 0xBFF7)
1 1 - 0xC000-0xFFFF (port 0xFFF7)
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby deathsoft » 19 Dec 2009, 23:57

VELESOFT wrote:??? This is correct:

Yes this is the same as on maxagor site (on maxagor site A14,A15, but i change columns to A15, A14 as in binary numbers).

When you write to port 0x3F77 - you change page in bank 0,
when you write to port 0x7F77 - you change page in bank 1 and so on.
Last edited by deathsoft on 19 Dec 2009, 23:59, edited 1 time in total.
User avatar
deathsoft
 
Posts: 4744
Joined: 07 Apr 2007, 00:58
Group: Registered users

Postby VELESOFT » 20 Dec 2009, 03:58

deathsoft wrote:When you write to port 0x3F77 - you change page in bank 0,
when you write to port 0x7F77 - you change page in bank 1 and so on.


0x3F77 and 0x7F77 is system port, or no ?
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby VELESOFT » 20 Dec 2009, 04:07

Actually I disassembly ATM TRDOS rom and find all OUT commands to system port and memory ports. In this trdos I see only one OUT to system port ( OUT FF77,A3 ) and some other OUTs to port FFF7 only (paging ram in area 16384-32767).
I can emulate this port in my PROFI INTERFACE.
Last edited by VELESOFT on 20 Dec 2009, 04:07, edited 1 time in total.
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby deathsoft » 20 Dec 2009, 23:42

VELESOFT wrote:0x3F77 and 0x7F77 is system port, or no ?

0x3F77,0x7F77, 0xBF77,0xFF77 - are memory manager posts for bank0 (0 - 0x3FFF), bank1 (0x4000-0x7FFF), bank2 (0x8000-0xBFFF), bank3 (0xC000-0xFFFF). The data writen to this ports select memory page (one of 64 pages) independently in each bank. You can map any ram or rom page in any memory bank.

FF77 - is port for memory bank3 at addresses 0xC000-0xFFFF (data writen t this port select one of 64 pages in memory range 0xC000-0xFFFF).
Last edited by deathsoft on 20 Dec 2009, 23:45, edited 1 time in total.
User avatar
deathsoft
 
Posts: 4744
Joined: 07 Apr 2007, 00:58
Group: Registered users

Postby VELESOFT » 21 Dec 2009, 02:43

deathsoft wrote:0x3F77,0x7F77, 0xBF77,0xFF77 - are memory manager posts for bank0 (0 - 0x3FFF), bank1 (0x4000-0x7FFF), bank2 (0x8000-0xBFFF), bank3 (0xC000-0xFFFF)


But as I can see in emulator UNREAL SPECCY with ATM TRDOS:

This code set ram page in BANK1(16384-32767):
LD A,#47
OUT (#F7),A ;set page #38 from adr. 16384

And this is port xxF7 (no xx77)
SPRINTER 2000,ZX SPECTUM128+2,DATA-GER,K-MOUSE,DIVIDE512
User avatar
VELESOFT
 
Posts: 26
Joined: 07 Aug 2008, 16:39
Group: Registered users

Postby deathsoft » 21 Dec 2009, 12:48

Ops, sorry, memory manager port is FFF7
(3FF7, 7FF7, BFF7, FFF7).

xx77 - is system port.
User avatar
deathsoft
 
Posts: 4744
Joined: 07 Apr 2007, 00:58
Group: Registered users


Return to ZX Spectrum

Who is online

Users browsing this forum: No registered users and 10 guests

cron