|
Post by mirkosoft on Jul 1, 2016 23:38:40 GMT
Hi! I own Commodore 128DCR with SuperCPU and CP/M Cartridge. I'm confused in case of Z80 in C128 and Z80 in cartridge. Z80 in cartridge has shifted addressing that what 8502 see as $0000-$FFFF Z80 sees as $1000-$FFFF...$0000-$0FFF - there is shift $1000 bytes. Problem is not addressing but I'm confused by reason: Ok, Commodore 64 and Commodore 128 have the same I/O port address C64 and C128 $0000 CPU on-chip I/O port data direction register $0001 CPU on-chip I/O port data register So, ok reason for addressing shift of external Z80 we know, but how works C128's internal Z80? It has not addressing shift and reset vector is same - both are Z80 - or I mean wrong? When C128 can handle Z80 reset vector and 8502 I/O - How it works? Or is possible to set external Z80 to state when disables addressing shift? Since I'm working with Z80 and CP/M I found many new things - in all cases: internal and external Z80 RAM dump I have, I'm ready to create CP/M 2.2 RAM dump and CP/M 3.0 RAM dump (in 3.0 want to find also CP/M's Easter Egg), I mean that DOS/65 needs not RAM dump, but maybe later. CP/M many times uses Kernal65 for tasks by switching CPU - it makes more free space for CP/M. Dumps will publish. If anyone has any knowledge about these things, please reply. I want to uncover Z80 mystery. Miro 54
|
|
|
Post by remark on Jul 2, 2016 12:33:37 GMT
Miro, I think the shifting in the C64 Z80 cartridge is done because it has no ROM onboard. In the C128, when the Z80 is active and (physical) RAM bank 0 is visible, the MMU will direct all reads.from 0-$1000 to the Z80 ROM. All writes will be directed to the RAM underneath. What exactly happens if you write to locarion 0 or 1 I do not know, but I read somewhere that you can not use the tape drive when Z80 is active. Edit. Here is a link with some more info: commodore64.se/wiki/index.php/Commodore_128_assembly_programming#Z80_CPU
|
|
|
Post by mirkosoft on Jul 2, 2016 20:54:17 GMT
In case of internal Z80 is only VIC screen in other area, I mean (not sure) that tape is accessible. Somewhere in that area is Z80BIOS, but why Z80 needs BIOS? 8502 and external Z80 it needs not - it looks BIOS is there only for CP/M. When I'm talking about Z80 I mean always Z80 CPU programming, not using/programming CP/M. One big advantage of CP/M 3.0 BDOS is writing to right bottom corner of screen active drive - read/write and trk/sec - I must to learn more deeply Z80 assembler and then find it in CP/M code what will be verrrry hard, but if successful, it will be pretty nice feature to use anywhere, for me personally in The Ace. Miro
|
|
|
Post by gsteemso on Jul 17, 2016 4:52:31 GMT
Unless Commodore made a special effort to duplicate the functionality in an entirely separate I/O port on another chip elsewhere in the system, it is impossible that the Z80 could ever access a cassette drive directly. Without actually looking up the details, I am certain that over half of the control and sense lines used to interface to the tape connector are only available from specific bits in the 8502’s onboard I/O port. Thus, for the Z80 to access the cassette drive at all, it would HAVE to do so indirectly via an 8502-mode subroutine.
|
|
|
Post by mirkosoft on Jul 17, 2016 8:34:33 GMT
Ok, thank you for explain. In case of CP/M - it uses lot Kernal85 subroutines...
Miro
|
|
|
Post by mirkosoft on Jul 17, 2016 11:20:09 GMT
Of course, I forgot lesson from SCPU - the same, 8502 is only emulated and my CassAdapt device works only if is SCPU turned off, so 65816 is inactive and real 8502 is active... Thank you again, sometimes I feel like moron, you're wise man.
Miro
|
|