rogerjowett wrote: ↑
Sun Apr 14, 2019 3:46 am
1. copper? what is it what can it do - the crash article said it can drive the 3x ay8912 is this correct does it do it in parallel with the z80n or is there contention with the z80?
I haven't seen the crash article but likely it was not up-to-date on things.
The copper can change nextreg state, which is a collection of hardware configuration bits. A list is here: https://www.specnext.com/tbblue-io-port-system/
The z80 and copper can both access this state and both can modify it simultaneously. The hw can only do one thing at a time but there is arbitration logic that will delay modifications by the z80 by one cycle if there is a collision.
The AY registers are not mapped to the nextreg state so the copper cannot write to the AY registers at this time. However this is in the suggestion pile. What the copper can do is change each AY to mono, change the ABC/ACB stereo mode and switch between one active AY chip and three.
2. 48kb of video ram for 256x192 with 256 colours per pixel - sam coupe had 24kb of video ram
Video ram usually implies memory used exclusively to generate video and nothing else. Frequently it is owned by a dedicated video chip and is outside the normal memory space. An example is the TMS99xx series which had its own ram and only allowed the cpu to access it through a narrow pipe; on z80 computers this was normally an io port. There are examples in the next as well. Palette memory is a separate memory space and so is sprite pattern memory.
On the spectrum (and the sam I guess), the "video ram" is bank 5 / bank 7. It's not video ram in the same sense because this is memory also mapped into the normal memory space. Since the ram is not fast enough to serve both video generation and cpu access at the same time, cpu access is slowed via contention when there is a conflict. The spectrum can generate video from two places in memory (bank 5 and bank 7) and I gather from you the sam can generate video from multiple places in ram.
On the next, layer 2 comes out of general memory as well. You can change where layer 2 video is generated from in units of 16k. You can change the source location at any time in the nextreg state (see nextreg 0x12) including between scanlines or in the middle of scanlines. The number of layer 2 screens you can have is only limited by how much memory you have.
In the current core there are two limitations. One is layer 2 can only come from the first 512k ram chip which contains 256k of ram seen by the system (the other memory contains the roms, esxdos rom, divmmc ram). So 256k would mean five independent layer 2 screens. However, this ram corresponds to 16k banks 0-15. 0-7 are the normal banks used by the spectrum for programs, system vars, etc. You may not want to use that for layer 2 screens. This limitation seems very artificial to me so I think it will be eliminated in future cores. The second limitation is a contention one. The current core's sram interface cannot serve layer 2's external ram fetch and the cpu's fetch at the same time at 14MHz. So the cpu is contended while layer 2 is fetching pixels by slowing it to 7MHz.
if you manage 28mhz then you are effectively matching the msx trubo r which although it had a clock speed of only 7mhz was in fact an r800 processor with effective 4x speed and 16bit multiplication i think too - you seem to be saying that your synthesized z80n has xtra instructions too what are they and what can they do please?
The problem with z80 successors, whether produced by Zilog or other companies, is that they are not completely compatible with the original z80.
For example, there are many z80 derivatives that run instructions faster. Instead of 4 cycles to run a particular instruction, they make take 1. What this does is break programs that relied on instruction speed to count time. This also breaks contention patterns between the ula and cpu. For example, demos that rely on timing won't work and things like the nirvana engine won't work. Attached hardware stops working because the bus cycles are different.
These z80 derivatives also did two things. None of them implement all the undocumented instructions. Not even the cmos z80 did that. However spectrum programmers did use some of those undocumented instructions, even insane ones they shouldn't have. That introduces some software incompatibility. Further, many z80 derivatives are a progression in the series in that they filled in the undocumented instruction space with new instructions. In the zx next, there are only a few additional instructions and they stay away from the portion of the undocumented instruction space that may have been used (hindsight is 20/20).