Shop OBEX P1 Docs P2 Docs Learn Events
SVGA High Color HW. — Parallax Forums

SVGA High Color HW.

davidsaundersdavidsaunders Posts: 1,559
edited 2011-04-24 16:58 in Propeller 1
Here is a block diagram of the High Color Prop SVGA. Drivers will follow in short order (my current drivers would be useless to most as they are directly related to the MuAmi project and weird as a result). This has been thoroughly tested to work.
Idea_0C.gif


This works by allowing you to write to a rectangular frame buffer during the blanking periods, and generate incrementing addresses during the active period at a rate of 1 per pixel. You must bring Blank Out high during the blanking period, and you must generate a valid HSync and VSync. I have modified this a little (and tested), in that there is not a sprite memory in this, and there is not a small buffer for a color LUT.

Some notes:
1) The Prop2Prop lines are used for simple inter Prop communication and data transfer.
2) The 2 bit Prop select bus can be reduced to 1 bit as we do not need 4 props for this (that is needed in MuAmi).
3) for anything higher than 512x480 with 640x480 timing, the lower bits of the address must be provided by the video generator during output, in order to provide the needed speed.
4) The Blank Out line is also used to control the R/W on the SRAM (wired so that it is set to read while /OE on the 74HCT244s is low, and write otherwise).
5) It is possible to get 20MB/s transfers on the Prop2Prop bus, using multiple cogs (actually possible to reach 40MB/s but that is difficult), the same is true with writing to SRAM (and this is useful if you want to redraw the frame buffer completely for every frame).
6) This is usually interfaced to a Primary control Prop, in the MuAmi.
800 x 600 - 12K
«1

Comments

  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 08:11
    Here is a block diagram of the High Color Prop SVGA.
    Interesting block diagram.
    Does Propeller read SRAM too?
    Why do you need 2 Propellers/SRAM?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 08:26
    jazzed wrote:
    Does Propeller read SRAM too?
    Why do you need 2 Propellers/SRAM?
    In this variant the Prop does not read SRAM, in the original variant the props can read SRAM, this requires another pin on Prop 2 to control the read/write line.
    Two props are only needed because the SRAM has to be parallel, and there just are not enough pins on one Prop (unless you do not need the Prop2Prop bus and can live with 8BPP color, though I figure that most will use this as part of a larger design with more Props).
  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 08:39
    Wouldn't it be easier and just as fast to use a latch and some buffers like a 74LC245 for selecting the SRAM byte lane?
    Being able to read the SRAM would be key for several Propeller applications such as XOR image manipulation.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 08:42
    Reading only requires one extra pin so it can be done. And yes you could latch the high bits of the address to save pins, though this could waste some memory on modes that the x resolution is not a power of two (as you would not be able to change the high bits in mid row with out some unwanted output).
  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 08:47
    And yes you could latch the high bits of the address to save pins, though this could waste some memory on modes that the x resolution is not a power of two (as you would not be able to change the high bits in mid row with out some unwanted output).
    How does having 2 propellers with complicated software solve that problem?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 10:08
    I guess either you complicate the HW or you complicate the software. Using two props allows the row length to be arbitrary with out having to waste ram between the end of the display row and the next power of two * current row. For 800x600 the latching all but the low ten bits you waste 1024 - 800 = 224 memory locations for every row. I guess this space could be used for something else.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 10:31
    The reason that this is write only as is, is that it was modified from the MuAmi video HW, which has another prop reading the data from a buffer in main system memory, and copying it to the video Props by way of the Prop2Prop bus. This allows any modification to the raw data (such as an XOR) to happen before it is written to the active video buffer. I did this because the Amiga can have its video buffer anywhere in the first 8MB of ram, and the Prop that reads and writes system memory does so in between the CPUs bus cycles (so as not to slow anything down).
  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 10:36
    So, what would be a simple and effective solution to get high resolution high color graphics out to VGA as just a Propeller add-on?
    I'm thinking a Propeller Platform footprint board might be a good starting point.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 10:48
    For that I would use a single prop variant, latching A10 through A21, bigger SRAMs (to compensate for the wasted mem) latch either the low or high word for writing to SRAM (cutting the data lines in half) and omit the Prop2Prop bus.
    So multiplex Address low and address high, multiplex Data low and data high, add the needed control lines for this (I think 3 lines), add a separate line for SRAM R/W and drop the Prop2Prop bus.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 11:02
    For that I would use a single prop variant, latching A10 through A21, bigger SRAMs (to compensate for the wasted mem) latch either the low or high word for writing to SRAM (cutting the data lines in half) and omit the Prop2Prop bus.
    So multiplex Address low and address high, multiplex Data low and data high, add the needed control lines for this (I think 3 lines), add a separate line for SRAM R/W and drop the Prop2Prop bus.
    Can you draw a new block diagram with this idea? I'll produce schematic/board files later.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 14:24
    jazzed:
    Here is a single prop version using latches. To simplify drawing I only drew the latches once for both in and out, in practice you will need 4 latchs (Data in, Data out, Address in, Address out) and to use some logic to select the correct one against read/write line.
    Idea_14.gif

    I should note I have not tested this one.

    Also it would take a bit longer to redraw the entire screen this way.
    800 x 600 - 14K
  • BaggersBaggers Posts: 3,019
    edited 2011-04-23 15:24
    Hi Dave,
    I've been trying to think of the answer, but couldn't think of one.
    What phone do you have?
  • jazzedjazzed Posts: 11,803
    edited 2011-04-23 16:48
    Hmm. The question comes up is: how you intend to drive the address lines?
    A Waitvid can drive 8 addresses at a time with CTRA.
    I suppose the other bits would be driven with "add outa, #$100".

    Baggers what do you think of all this?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 17:40
    Baggers:
    Sorry the problem is not the phone per se, it is that its camera is somehow broken (not sure what happened to cause it to behave as it does).
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-23 18:25
    Jazzed:
    Thank you you have me thinking on some possible improvements to the MuAmi video. Probably still not single prop, though maybe easier coding for.
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 01:21
    I'm wondering how he's gonna write to sram while it's displaying a 320x200 image it doesn't give you much write time, plus emulating a 68K at 7Mhz where is the amiga program going to be stored? in the same ram the screen is read from? cos you'd have the read/writes to get/perform the instructions, and doing screen, and blitter/copper list changes, and display the screen.
    I think if it's doable it's going to be fantastic, but I can't see prop1 being fast enough to do it, the problem with the external sram display drivers is fill speed.
    Not only that, using two props, you're going to need to let the second prop know what the first prop is telling the sram to do, to keep in sync, plus which one is running the 68K emulator, and does it have access to both sets of sram, if it doesn't how will it read the upper/lower bytes, cos if it's going through the second prop for comms it's gonna be way too slow.
    That's my personal thinking on it.
    I'd love to be proven wrong, and see this working though!

    OT I'm beginning to think this whole external sram development for a display is the wrong approach, you remove all what is great about the prop. parallelism, it then comes down to one cog running the show, you might as well opt for an arm then!
    HUB-RAM is your friend! :D
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 02:02
    He's also going to have sync troubles with two props, they never sync correctly. yes, a prop is deterministic as a single, but due to Boot up being RC you can never predict the EXACT same startup times for two props.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 06:31
    Baggers:
    Yes, there are some difficulties in synchronization between the two props.
    No I am not emulating a 68000 on the Prop 1 (ok I am playing with it in preparation for the prop II), I am using real 680x0 CPUs in the MuAmi, hence the need for a Prop2Prop bus.
    This is only part of the peripheral HW for the MuAmi. MuAmi uses 5 Props to produce an AGA compatible though better chipset.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 06:34
    Baggers wrote:
    OT I'm beginning to think this whole external sram development for a display is the wrong approach, you remove all what is great about the prop. parallelism, it then comes down to one cog running the show, you might as well opt for an arm then!
    If I did that I would not have the extra cogs to have fun with sprites, simple 3D, BliTTer, etc...
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 06:48
    Baggers:
    Yes, there are some difficulties in synchronization between the two props.
    No I am not emulating a 68000 on the Prop 1 (ok I am playing with it in preparation for the prop II), I am using real 680x0 CPUs in the MuAmi, hence the need for a Prop2Prop bus.
    This is only part of the peripheral HW for the MuAmi. MuAmi uses 5 Props to produce an AGA compatible though better chipset.

    ok, now you're really confusing me, you've got a 68K, which would be using the ram, as you would expect, but you have the props wired up to the ram, which is wired to the dac?
    And you have 5 props? can you elaborate a little more as you've lost me with what is doing what? cheers
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 06:50
    If I did that I would not have the extra cogs to have fun with sprites, simple 3D, BliTTer, etc...

    why did you feel the need to modify my name in the Quote section from Baggers to Beggers?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 07:23
    Baggers wrote:
    ok, now you're really confusing me, you've got a 68K, which would be using the ram, as you would expect, but you have the props wired up to the ram, which is wired to the dac?
    And you have 5 props? can you elaborate a little more as you've lost me with what is doing what? cheers
    The portion shown in the first post is just the video, the 680x0 can not directly see that ram. Another prop is dedicated to accessing the system memory (based on the AGA registers, and sendint data by way of the Prop2Prop bus to this section, the Prop accessing system memory also controls the KB and Mouse, and emulates the Copper. There is another prop that is responsible for Sound, Joystick ports, etc., and another prop does some extra processing related to the chipset and coordinates the other 4.

    Now because the the data originates from a frame buffer in system RAM that is separate, any bitwize operation can be doen befor it is written to the buffer shown. In order to have the entire thing work in a way that is faster than the original, it only actually updates half of the lines in one frame, making the effective real refresh rate 30fps (for a 60Hz display refresh).
    Baggers wrote:
    why did you feel the need to modify my name in the Quote section from Baggers to Beggers?
    Sorry about that I had miss typed it. I always type out the [qu0te="person"] and [/qu0te]
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 08:19
    The portion shown in the first post is just the video, the 680x0 can not directly see that ram. Another prop is dedicated to accessing the system memory (based on the AGA registers, and sendint data by way of the Prop2Prop bus to this section, the Prop accessing system memory also controls the KB and Mouse, and emulates the Copper. There is another prop that is responsible for Sound, Joystick ports, etc., and another prop does some extra processing related to the chipset and coordinates the other 4.

    Now because the the data originates from a frame buffer in system RAM that is separate, any bitwize operation can be doen befor it is written to the buffer shown. In order to have the entire thing work in a way that is faster than the original, it only actually updates half of the lines in one frame, making the effective real refresh rate 30fps (for a 60Hz display refresh).


    Sorry about that I had miss typed it. I always type out the [qu0te="person"] and [/qu0te]

    Ok, no worries about the typo :D

    as for the prop between the 68k and sram props, how are you getting the address pins ( minimum 19 ) and data pins ( 32 pins ) from the 68K, sent to a second prop, then address the sram, read/write 32bit access, and get it back to the 68k's prop in time for the 68k to see it at full speed? let alone 3x full speed aga performance?
    btw, I'm sorry for all the tech questions, it's that I'm really curious, and I'm finding it hard to see it working, which is why I as wanting to see it running, this kind of stuff really interests me!
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 08:54
    Baggers wrote:
    I'm sorry for all the tech questions, it's that I'm really curious, and I'm finding it hard to see it working, which is why I as wanting to see it running, this kind of stuff really interests me!
    No worries. I rather enjoy that others are interested in this. I must apologize for my difficulty in explaining it very well. I am looking for a video camera that I can barrow. It will be a lot easier once the Prop II comes out as there will only be 2 PropII chips in the system.

    As for how it is done the Prop that reads system mem is using Latches for the upper address bits, and I am limiting the 680x0 to a 68040 or lower so I can keep up with it and still sneak in between 680x0 bus cycles to read/write main mem.

    As to questions directly regarding the MuAmi I finally decided to start a thread on the MuAmi (as this thread is for better Prop video output).
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 08:55
  • BaggersBaggers Posts: 3,019
    edited 2011-04-24 08:58
    Cool, yeah I just saw your thread, and as for borrowing a camera, that would be ace, to see it in action :D nice one!
  • Pence128Pence128 Posts: 20
    edited 2011-04-24 15:30
    For a little more hardware, you can save a lot of software. Replace the address latch with presettable counters (5x '161, '163, '191 or '193) on all of the address lines and merge the address and data buses. Drive the RAM's R/W lines separately and replace the data latch with a bus transceiver ('245). That should be 21 pins: 8 bit bus, 3 strobes to latch an address, 1 clock to increment the address, 4 /OE and /WE, 2 for a '245, 1 Vsync, 1 Hsync, and 1 blank out.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 15:48
    Pence128:
    I wish I would have that suggestion back when I was working with AVRs. Amazing thought though.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 16:13
    A thought prompted by kwin's new thread, using SPLDs, is this a reasonable possibility? Specifically the ATF16V8C by Atmel?
    A secondary note, how do you successfully program these, both programmer HW and software??? I have tried many supposedly working methods without success. The programmers that worked for the equivalent from the 1980s do NOT work at all. I would like to use these as I have 50 of them sitting in the tube that they came from Arrow in.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-24 16:44
    And the light went on. EUREKA!!
    I just figured out a ridiculously simple single Prop version that will work just as well. I will be posting a block diagram in a bit (drawing it now). I will be testing it this evening and if it works I will be updating the top post of this thread to reflect such, as well as the top post of the MuAmi thread (because this will also change the MuAmi video HW [it is less expensive]).
Sign In or Register to comment.