This blog aims to follow the development of my FPGA based Spectrum Compatible computer. The ZX Prism should remain compatible with the ZX Spectrum whilst expanding its graphics and memory.
Thursday, July 28, 2016
Another 256 colour 256x128 Demo Image
Just a tiny update to show off another demo image showing off the linear 256x128 256 colour "clashless" mode.
Yes, I DO seem to use Satan for demos quite often don't I.
I'm building the thing and writing the FPGA microcode. 56MHz is the fastest CPU clock that I'm trying to implement (the CPU is modelled within the FPGA), but I'm having problems with crashes when interrupts are enabled. It may end up being max CPU speed of 28MHz with interrupts enabled.
32K on Prism; this is a limitation of the resources on the FPGA so it's not going to increase in size (unless I move to a different FPGA - and that's not likely any time soon)
is the video ram fast as in faster than the normal program ram - like the bbc model b which had double speed video ram so that the processor was not interrupted or suffered from contention please?
could you team up with someone to develop pc tools to convert screens (and ofcourse i'd love to see video especially as 56MHz is fast enough to pull the full amount of data in at sufficiently high frame rates) to the zx prisnn
There's already a couple of tools for converting screens to a couple of the modes. I'm not interested in video so that's up to someone else to arrange/code.
Tasword 128 would already work on Prism. No need for any conversion unless for some reason you wanted to modify it to use a different screen mode. Why you'd want to run a word processor on a FPGA-based spectrum compatible when you could run something more modern on a PC/Mac/Linux box is beyond me though!
56MHz - wow that is even faster than the 7MHz R800 processor in the msx turboR - which is supposed to be arounbd 28MHz compared with a z80 - mind you she does have a lot of video ram 192kb and a vdp9990 which has a lot of hardware sprites and hardware scrolling both vertical and horizontal - though nothing like a maths coprocessor for assisting with 3d vectors are you sure you arent planning programs like doom for zx prisnn?
Doom would be nice, but I'll settle for something like Alien Breed or Super Mario World personally... I don't expect any will actually happen though! :)
None. This is a home-grown DIY project, not a commercial product. A couple of other people other than myself have written software for it, but they're in no way dedicated to only working on Prism software.
this shows you how much video ram contention the processor suffers with a normal internal 512kb ram sam coupe - though there is less if we use external 1mb ram interface for full 6mhz running see youtube
freescape running at 6MHz https://www.youtube.com/watch?v=3x0VsNWEs-4
no but if you want to measure its performance by some kind of landmark than the msx turbo R is the most video ram on an 8bit machine - just hoping i guess
is there anyway to combine the video output of more than one fpga please in particular using more than one z80 in parallel so that if they both had 8bit per pixel then the effect would be to increase from one to 16bit and with three fopr the full 24bit tru colour effects no? sam mode 3 has hmpr bits 5 &6 that can select the different four colours from the clut for what should be a four colour only screen but no DMA to assist with this? do you know anything about a maths coprocessor please?
You'd be better off just using a bigger FPGA and modeling two Z80s if you wanted to run them in parallel. That wouldn't affect bit depth though, so your question doesn't fully make sense.
I don't really care what Sam modes do, Prism isn't a Sam, nor is it intended to ever be Sam compatible. I don't know anything about Sam maths coprocessor.
Prism doesn't have a maths coprocessor. It's fast enough as it is at the moment.
the reason i was asking about the parallel thingi was that surely with three processors you could fix the colour pallette at 256 colours maximum and then combine the video output from the three processors to give 24bit tru colour - only each processor would only 'see' 8bits per pixel?
The processors don't determine the palette colour depth. ULA2's palette is done in such a way that it can support up to 24 bit colour - the 12 bit colour restriction is mainly down to my balancing colour depth with FPGA out pits required to drive the video DACs. If I have 12 spare output pins on the FPGA after I've added all the external hardware I want to add, then I'll increase the colour depth.
similarly if you had two processors each with a 12bit colour palette as you claim to have then the second processor would give the full 24bit tru colour depth to the palette - couldn't it also help with interlaced images as you have a fixed amount of video ram on your fpga system - does your system have any audio capabilities - anything similar to the general sound neo? i think that has a 12mhz80 with mp3 playback from an sd memory card but i cant get any sense from the russian manufacturers - at least not by email!
I don't "claim to have" 12 bit colour - I *do* have 12 bit colour, and I've posted plenty of pictorial evidence of that.
Adding more processors (soft Z80s) won't help anything. I think you're thinking of the Spec256 emulator which basically ran 8 copies of every game, one per processor, with the graphics/colour modified on each instance to give 256 colours. A very odd way to do it.
Prism doesn't have interlaced images. It outputs 640x480 VGA, which is plenty of pixels to display a 256x192 or 512x384 res mode without needing to interlace.
Prism currently only has beeper sound. I'm adding an AY as on the 128K spectrums, plus an SAA as on the Sam. On top of that, I'm adding an audio codec chip which automatically decodes MP3, OGG and WAV from a bit stream sent to it. It also acts as a MIDI player.
So there'll be plenty of audio options eventually, but at the moment... just BEEP!
48kb of video ram is impossible you say what a pity it would have been a drastic improvement to all these closed systems if you designed something that had a more open architecture - in other words that we could add ram and processors to to boost performance?
It's not possible on the FPGA I'm using in Prism's development. There are other FPGAs out there with more on-chip memory cells that could do 48K or more -- or I could redesign the memory interface and use SRAM or SDRAM for video memory shared with the CPU ... but that introduces memory contention again as it's not dual ported RAM (and gets horribly messy to get the bus arbitration correct when the CPU and video clock domains don't have a common base clock).
Prism is being designed by me FOR me. It's something I've been dreaming up since I was 13 or so, so it's going to do what I want it to, not what other people demand. Prism WILL be open once it's finished (and probably once a couple of friends with better knowledge of FPGA design have taken a good look over it to iron out any wrinkles).
People will then be free to build their own, add RAM, put it on a bigger FPGA with more on-chip memory, add more SRAM etc etc. I know once I "finish", I'll carry on tinkering anyway...
Unfortunately that's not true. Spec256 basically has 8 virtual Z80 CPUs with their own RAM. Each runs a modified version of the original game. Therefore it's actually 8 lots 6K of memory for graphics (so 48K). Sorry!
not sure but i think the atm turbo website is also home of the general sound neo which uses an sd memory card to read mp3 tracks while you run 7mhz zx spectrum software - i tried to find out about the pinouts on the socket that the general sound neo plugs into - yes that's right i was trying to find out if the video output red green and blue signals were included so far no joy once again big thanks and happy newyear
the thing is we really need 512x384 with at least 64k colours and even then the 50MHz+ processor wouldnt be able to cope and it wouldnt look any better than a pc without a 3dfx chipset to boost the frame rate and add anti aliasing?
Do we REALLY need that on a Spectrum type computer? I don't think so. Like you say, the CPU wouldn't be able to shift the amount of data needed - in fact it'd be more memory than the CPU could address without paging a LOT making things even slower.
what is a spectrum type computer you mean a single processor? the bbc model b could have two and the micro command interface had its own z80 though that was used solely for audio input i think
Prism is Spectrum compatible. Apart from differences in timing in its display rendering and lack of memory contention which means that "rainbow processing" type effects don't work, Prism can run the majority of software for the Spectrum. Ergo "Spectrum type computer".
Actually it'd end up 256x256, would probably flicker like all hell and would need you to copy 32K into VRAM every frame which would require a *lot* of paging. A lot of effort for something that wouldn't look that great probably.
Sure there's software tricks you can do, and that's half the fun of hacking around with a system - but at the moment I'm still working on the hardware, so all I'm concerned with at the moment is what can be implemented in hardware. Feel free to speculate what you could do in software, but it doesn't really interest me (at least not at the moment). Software screen modes get very timing specific - and at the moment, Prisms timings aren't nailed down yet.
Prism has a 16, 32 or 256 colour hardware 256x384 mode (using attributes) which uses about 12K of video memory, and similarly a 512x384 mode which uses about 24K.
ld sp,add+32k-16 pop af,bc,de,hl exx ex af' pop af,bc,de,hl ld sp,video ram address32k-16 push hl,de,bc,af exx ex af' push hl,de,bc,af repeat for 16bytes only needs another32k/16
Prism has ULAplus AND it's own ULA2. ULA2 can do 256 colours (and even 4096 colours in one of its modes, though there's restrictions on how you can use them). Only certain modes are clashless (some are "planar" like a lot of the Amiga's modes, others are "chunky" like early PC modes). I am on WoS as JeffB though I hardly post there - I've posed a couple of things about Prism in the Hardware section (see https://www.worldofspectrum.org/forums/discussion/48092/ for example) over the years. I'm also a member of most of the Spectrum related Facebook groups.
Velesoft interlaced graphics wonder if they are compatible with the ula+ and the spectra interface? be nice wouldn't it esepecially with a 56MHz80! or even better an ez80190 symbiote see quazar website
those interlaced graphics look incredible almost too good to be true 256x384 and it looks like more than two colours per attribute square! can this be possible?
if the ula+ gives 8 pixel attributes that is 12kb of video ram the spectra interface has 18kb of video ram so 4 pixel attributes or even 2x2 pixel attributes
if the interlaced could combine two ula+ screens then that is 24kb of video ram so in theory it should be able to have 256x192 with 4 bits per pixel just like the sam coupe mode 4 what a pity we cant have 512x384 and 8bits per pixel or more that really would sell itself especially if it had 56MHz on tap or an ez80190 at 50mhz supposedly 25mips no?
looks like the zx spectrum next might not have 28mhz after all and that is with 48kb of video ram - think your prism is going to be the most powerful 8bit even more powerful than the msx turboR with its 7mhz r800 processor which is technically a 28mhz z80
I think the next has 48kb of video ram so 256 x 192 with 8bits per pixel that's 256 colours from a palette of 512 there's also tile map mode and maybe interlaced support my guess is the spectra just plugs into the edge connector as usual
how can it have 256 colours and only use 16kb?
ReplyDelete...it doesn't use 16K .. no idea where you got that from. It uses 32K.
Deletecant you ofcus on modes like 256x384 intelraced or 512x384 - this last one is opengl & directX compatible surely
ReplyDeleteThere is a 256x384 mode and a 512x384 mode. Neither are interlaced, they don't need to be.
DeletePrism is real hardware, not a PC emulator so directX and openGL are completely irrelivant
okthanks
ReplyDelete56MHz are you sure ? that's 7 mips no?
ReplyDeleteI'm building the thing and writing the FPGA microcode. 56MHz is the fastest CPU clock that I'm trying to implement (the CPU is modelled within the FPGA), but I'm having problems with crashes when interrupts are enabled. It may end up being max CPU speed of 28MHz with interrupts enabled.
Deletedo you know what the maximum amount of video ram for a screen is please?
ReplyDelete32K on Prism; this is a limitation of the resources on the FPGA so it's not going to increase in size (unless I move to a different FPGA - and that's not likely any time soon)
Deleteis the video ram fast as in faster than the normal program ram - like the bbc model b which had double speed video ram so that the processor was not interrupted or suffered from contention please?
ReplyDeletePrism has no memory contention.
Deletecould you team up with someone to develop pc tools to convert screens (and ofcourse i'd love to see video especially as 56MHz is fast enough to pull the full amount of data in at sufficiently high frame rates) to the zx prisnn
ReplyDeleteThere's already a couple of tools for converting screens to a couple of the modes. I'm not interested in video so that's up to someone else to arrange/code.
Deleteis there any chance of converting or getting to work a straight conversion of tasword 128k please?
ReplyDeleteTasword 128 would already work on Prism. No need for any conversion unless for some reason you wanted to modify it to use a different screen mode. Why you'd want to run a word processor on a FPGA-based spectrum compatible when you could run something more modern on a PC/Mac/Linux box is beyond me though!
Delete56MHz - wow that is even faster than the 7MHz R800 processor in the msx turboR - which is supposed to be arounbd 28MHz compared with a z80 - mind you she does have a lot of video ram 192kb and a vdp9990 which has a lot of hardware sprites and hardware scrolling both vertical and horizontal - though nothing like a maths coprocessor for assisting with 3d vectors
ReplyDeleteare you sure you arent planning programs like doom for zx prisnn?
Doom would be nice, but I'll settle for something like Alien Breed or Super Mario World personally... I don't expect any will actually happen though! :)
Deletethat is the other question how many dedicated programmers do you have available!?
DeleteNone. This is a home-grown DIY project, not a commercial product. A couple of other people other than myself have written software for it, but they're in no way dedicated to only working on Prism software.
Deletehttp://simonowen.com/sam/articles/mode1/
ReplyDeletethis shows you how much video ram contention the processor suffers with a normal internal 512kb ram sam coupe - though there is less if we use external 1mb ram interface for full 6mhz running see youtube
freescape running at 6MHz
https://www.youtube.com/watch?v=3x0VsNWEs-4
This isn't a Sam.
DeletePrism has no memory contention as its VRAM is dual ported ("ULA2" can read it at the same time as the CPU is reading/writing to it)
I can run Freescape at up to 28MHz already ;)
you couldn't move up to 48kb of vram would make a big difference no?
ReplyDeleteNo I can't, it's a hardware limitation - you've asked me that before ;)
ReplyDeletethe msx turbo R has 192kb opf video ram but the video modes are different along with hardware scrolling and several hardare sprites
ReplyDeleteI don't see what that has to do with Prism. It's not an MSX.
Deleteno but if you want to measure its performance by some kind of landmark than the msx turbo R is the most video ram on an 8bit machine - just hoping i guess
DeleteI'm not interested in comparing Prism against other machines like that, sorry.
Deletewhat size colour palette are you offering please?
ReplyDeleteThe Prism prototype has 12 bit colour, so the pallete is 256 colours chosen from 4096.
Deleteis there anyway to combine the video output of more than one fpga please in particular using more than one z80 in parallel so that if they both had 8bit per pixel then the effect would be to increase from one to 16bit and with three fopr the full 24bit tru colour effects no? sam mode 3 has hmpr bits 5 &6 that can select the different four colours from the clut for what should be a four colour only screen but no DMA to assist with this?
ReplyDeletedo you know anything about a maths coprocessor please?
You'd be better off just using a bigger FPGA and modeling two Z80s if you wanted to run them in parallel. That wouldn't affect bit depth though, so your question doesn't fully make sense.
DeleteI don't really care what Sam modes do, Prism isn't a Sam, nor is it intended to ever be Sam compatible. I don't know anything about Sam maths coprocessor.
Prism doesn't have a maths coprocessor. It's fast enough as it is at the moment.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
DeleteThis comment has been removed by the author.
Deletethe reason i was asking about the parallel thingi was that surely with three processors you could fix the colour pallette at 256 colours maximum and then combine the video output from the three processors to give 24bit tru colour - only each processor would only 'see' 8bits per pixel?
DeleteThe processors don't determine the palette colour depth. ULA2's palette is done in such a way that it can support up to 24 bit colour - the 12 bit colour restriction is mainly down to my balancing colour depth with FPGA out pits required to drive the video DACs. If I have 12 spare output pins on the FPGA after I've added all the external hardware I want to add, then I'll increase the colour depth.
Deletesimilarly if you had two processors each with a 12bit colour palette as you claim to have then the second processor would give the full 24bit tru colour depth to the palette - couldn't it also help with interlaced images as you have a fixed amount of video ram on your fpga system - does your system have any audio capabilities - anything similar to the general sound neo?
ReplyDeletei think that has a 12mhz80 with mp3 playback from an sd memory card but i cant get any sense from the russian manufacturers - at least not by email!
I don't "claim to have" 12 bit colour - I *do* have 12 bit colour, and I've posted plenty of pictorial evidence of that.
DeleteAdding more processors (soft Z80s) won't help anything. I think you're thinking of the Spec256 emulator which basically ran 8 copies of every game, one per processor, with the graphics/colour modified on each instance to give 256 colours. A very odd way to do it.
Prism doesn't have interlaced images. It outputs 640x480 VGA, which is plenty of pixels to display a 256x192 or 512x384 res mode without needing to interlace.
Prism currently only has beeper sound. I'm adding an AY as on the 128K spectrums, plus an SAA as on the Sam. On top of that, I'm adding an audio codec chip which automatically decodes MP3, OGG and WAV from a bit stream sent to it. It also acts as a MIDI player.
So there'll be plenty of audio options eventually, but at the moment... just BEEP!
48kb of video ram is impossible you say what a pity it would have been a drastic improvement to all these closed systems if you designed something that had a more open architecture - in other words that we could add ram and processors to to boost performance?
ReplyDeleteIt's not possible on the FPGA I'm using in Prism's development. There are other FPGAs out there with more on-chip memory cells that could do 48K or more -- or I could redesign the memory interface and use SRAM or SDRAM for video memory shared with the CPU ... but that introduces memory contention again as it's not dual ported RAM (and gets horribly messy to get the bus arbitration correct when the CPU and video clock domains don't have a common base clock).
DeletePrism is being designed by me FOR me. It's something I've been dreaming up since I was 13 or so, so it's going to do what I want it to, not what other people demand. Prism WILL be open once it's finished (and probably once a couple of friends with better knowledge of FPGA design have taken a good look over it to iron out any wrinkles).
People will then be free to build their own, add RAM, put it on a bigger FPGA with more on-chip memory, add more SRAM etc etc. I know once I "finish", I'll carry on tinkering anyway...
http://www.emulatronia.com/emusdaqui/spec256/download-eng.htm
ReplyDeleteusing a similar style to this you could get 256x192 256 colours for only 6kb of video ram! wow!
Unfortunately that's not true. Spec256 basically has 8 virtual Z80 CPUs with their own RAM. Each runs a modified version of the original game. Therefore it's actually 8 lots 6K of memory for graphics (so 48K). Sorry!
Deletehttp://atmturbo.nedopc.com/
ReplyDeletenot sure but i think the atm turbo website is also home of the general sound neo which uses an sd memory card to read mp3 tracks while you run 7mhz zx spectrum software - i tried to find out about the pinouts on the socket that the general sound neo plugs into - yes that's right i was trying to find out if the video output red green and blue signals were included so far no joy
once again big thanks and happy newyear
Happy New Year to you too Roger. Thanks for your continued enthusiasm and comments mate.
Deletethe thing is we really need 512x384 with at least 64k colours and even then the 50MHz+ processor wouldnt be able to cope and it wouldnt look any better than a pc without a 3dfx chipset to boost the frame rate and add anti aliasing?
ReplyDeleteDo we REALLY need that on a Spectrum type computer? I don't think so. Like you say, the CPU wouldn't be able to shift the amount of data needed - in fact it'd be more memory than the CPU could address without paging a LOT making things even slower.
Deletewhat is a spectrum type computer you mean a single processor? the bbc model b could have two and the micro command interface had its own z80 though that was used solely for audio input i think
ReplyDeletePrism is Spectrum compatible. Apart from differences in timing in its display rendering and lack of memory contention which means that "rainbow processing" type effects don't work, Prism can run the majority of software for the Spectrum. Ergo "Spectrum type computer".
Deletewe aren't taking on microsoft and sony then!?
ReplyDeleteif you have a z80 doing over 50mhz then surely you can intelace two 32kb video ram images giving 256x384?
ReplyDeleteActually it'd end up 256x256, would probably flicker like all hell and would need you to copy 32K into VRAM every frame which would require a *lot* of paging. A lot of effort for something that wouldn't look that great probably.
DeleteSure there's software tricks you can do, and that's half the fun of hacking around with a system - but at the moment I'm still working on the hardware, so all I'm concerned with at the moment is what can be implemented in hardware. Feel free to speculate what you could do in software, but it doesn't really interest me (at least not at the moment). Software screen modes get very timing specific - and at the moment, Prisms timings aren't nailed down yet.
Prism has a 16, 32 or 256 colour hardware 256x384 mode (using attributes) which uses about 12K of video memory, and similarly a 512x384 mode which uses about 24K.
ld sp,add+32k-16
ReplyDeletepop af,bc,de,hl
exx ex af'
pop af,bc,de,hl
ld sp,video ram address32k-16
push hl,de,bc,af
exx ex af'
push hl,de,bc,af
repeat for 16bytes only needs another32k/16
Yes, but why when you'd have all the new hardware screen modes to play with?
DeleteBeing clashless and having a ULA+ would've made a *huge* difference during the Spectrum's golden years...
ReplyDeleteHow do I send you a private msg? Are you on WOS? Thank you.
Prism has ULAplus AND it's own ULA2. ULA2 can do 256 colours (and even 4096 colours in one of its modes, though there's restrictions on how you can use them). Only certain modes are clashless (some are "planar" like a lot of the Amiga's modes, others are "chunky" like early PC modes). I am on WoS as JeffB though I hardly post there - I've posed a couple of things about Prism in the Hardware section (see https://www.worldofspectrum.org/forums/discussion/48092/ for example) over the years. I'm also a member of most of the Spectrum related Facebook groups.
Deleteplease add more fast video ram to your design - the MSXturboR has 192kb of video ram just think of all the extra modes!
ReplyDeleteThis comment has been removed by the author.
ReplyDelete20 MHz ez80190 48MHz more like 200MHz80
ReplyDeletehttps://www.youtube.com/watch?v=askWNtwsFQQ
ReplyDeleteVelesoft interlaced graphics wonder if they are compatible with the ula+ and the spectra interface? be nice wouldn't it esepecially with a 56MHz80! or even better an ez80190 symbiote see quazar website
ReplyDeletehttps://sites.google.com/site/ulaplus/home
ReplyDeletehttp://www.fruitcake.plus.com/Sinclair/Spectrum/Spectra/SpectraInterface.htm
ReplyDeletehttp://www.samcoupe.com/
ReplyDeletethose interlaced graphics look incredible almost too good to be true 256x384 and it looks like more than two colours per attribute square! can this be possible?
ReplyDeleteif the ula+ gives 8 pixel attributes that is 12kb of video ram
ReplyDeletethe spectra interface has 18kb of video ram so 4 pixel attributes or even 2x2 pixel attributes
This comment has been removed by the author.
ReplyDeleteif the interlaced could combine two ula+ screens then that is 24kb of video ram so in theory it should be able to have 256x192 with 4 bits per pixel just like the sam coupe mode 4
ReplyDeletewhat a pity we cant have 512x384 and 8bits per pixel or more that really would sell itself especially if it had 56MHz on tap or an ez80190 at 50mhz supposedly 25mips no?
hopefully sending you something shortly....
ReplyDeletelooks like the zx spectrum next might not have 28mhz after all and that is with 48kb of video ram - think your prism is going to be the most powerful 8bit even more powerful than the msx turboR with its 7mhz r800 processor which is technically a 28mhz z80
ReplyDeleteI think the next has 48kb of video ram so 256 x 192 with 8bits per pixel that's 256 colours from a palette of 512 there's also tile map mode and maybe interlaced support my guess is the spectra just plugs into the edge connector as usual
ReplyDeleterogerjowett@gmail.com
ReplyDelete