Welcome, Guest. Please login or register.


Author Topic: External colour tests (Read 17687 times)

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #15 on: 2018.June.09. 13:57:17 »
More tests from Habi on video. Now he has put his logo on the screen, by now  static.

https://www.youtube.com/watch?v=--j_XXJ0MME

The texts that appear on the screen are:

-External video on a Enterprise(sprites).

-Source code on VHDL.

-By now static position.

-Elements of the set.(TV, Enterprise, FPGA, Laptop).

-Starting.

-Sprite active only where there is no border.

-The EXOS palette varies according to the video mode of the Enterprise.

-Transparency test.

-Let's see the real colours.

-End.



The transparency is made programming the FPGA to put high the /EXTC signal on colour 0 when its button is pressed.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: External colour tests
« Reply #16 on: 2018.June.09. 14:24:13 »
Nice! :smt038

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: External colour tests
« Reply #17 on: 2018.June.11. 08:28:33 »
cool :smt041

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #18 on: 2018.July.08. 14:35:32 »
[ Guests cannot view attachments ]
[ Guests cannot view attachments ]
[ Guests cannot view attachments ]

Where is Wally?


I have replicated the FPGA interface. Thanks to Habi for his patience...

[ Guests cannot view attachments ]
« Last Edit: 2018.July.08. 16:23:17 by gflorez »

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: External colour tests
« Reply #19 on: 2018.July.08. 19:52:59 »
coool :smt041

Offline dangerman

  • EP fan
  • *
  • Posts: 100
Re: External colour tests
« Reply #20 on: 2018.July.09. 00:19:52 »
Wow - this is amazing. Never seen anything like this on the Enterprise before. I always wondered if the sprite signals actually worked.

16 colour sprites in high resolution - exciting stuff!!!

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #21 on: 2018.July.09. 10:36:03 »
Yes, very exciting...

But these are very preliminary tests, only a proof of concept. Bad news are that perfect superposition is only possible on Enterprises with a healthy Nick chip. On my older EP, affected  by the defective Nick, a lot of artefacts are produced on the transition colour zones, worse with some combinations. Probably this error have degrees, the very same like the defective flashing pixels on some heavy coloured screens.

But let's continue with good things. The next test I will do is to move the sprite all over the screen, not real computer controlled graphics... only a simulation of a joystick port on the FPGA that will change the coordinates where the sprite is drawn.

Also I will try to put a multicoloured picture other than the mad scientist, the avatar of my friend Habi...

Less than 1% of the space of the FPGA is used by now. But to full exploit it is necessary to connect all the Enterprise bus to it and create ports on the code to communicate the two engines. There are an excess of space and programmable pins to do it, even some to create external interfaces. For example, there is a description of the WD1772 chip that can fit inside the FPGA....

But it is a pity that only Balagezs or Habi (and now I, with all my skill lacks....), can test this approach. Is for that my friend Wilco plan to design a development extension card to fit onto a bus expander or Bridge board, instead of having all the involved parts scattered on the table.

So what we need now is an accelerated  VHDL programming tutorial.
« Last Edit: 2018.July.09. 11:00:00 by gflorez »

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #22 on: 2018.July.10. 11:22:23 »
https://youtu.be/lw1e0pD4EmE

This is me controlling the sprite with a joystick on the FPGA. Habi implemented it yesterday.

Sorry for the bad image and sound(I forgot I was whistling....)
« Last Edit: 2022.March.15. 21:23:51 by gflorez »

Offline Tutus

  • EP lover
  • *
  • Posts: 679
  • Country: hu
    • Enterprise 128
Re: External colour tests
« Reply #23 on: 2018.July.10. 12:30:33 »
:smt041 :smt041 :smt041
Fantastic!!!

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #24 on: 2018.July.10. 13:18:07 »
Main code is simple:

Code: [Select]
Library IEEE;
Use IEEE.Std_Logic_1164.All;
Use IEEE.Numeric_Std.All;

Entity PCWVid Is
Port (
-- Entradas vídeo (sincronismos)/ Video input (syncs)
HSync : In Std_Logic;
VSync : In Std_Logic;
-- Entrada reloj  / Clock input
Clk14 : In Std_Logic;
-- Salidas vídeo  / video output
ExtN : Out Std_Logic_Vector(3 DownTo 0); -- Los 4 bits a inyectar
ExtC : Out Std_Logic; -- Strobe colores externos
-- Desarrollo (placa)  /development FPGA
Led0 : Out Std_Logic;
Led1 : Out Std_Logic;
Btn0 : In Std_Logic; -- Usado de momento para la transparencia
Btn1 : In Std_Logic;
Clk50 : In Std_Logic;
-- Joystick
Joy : In Std_Logic_Vector(3 DownTo 0) -- Joystick
);
End PCWVid;

Architecture Behavioral Of PCWVid Is
Signal CuentaH : Std_Logic_Vector(9 DownTo 0); -- Posición horizontal /horizontal position
Signal CuentaV : Std_Logic_Vector(8 DownTo 0); -- Posición vertical  / vertical position

Signal LatchH  : Std_Logic;
Signal LatchV  : Std_Logic;

Signal SprAddr : Std_Logic_Vector(12 DownTo 0);
Signal Color : Std_Logic_Vector(3 DownTo 0);

Signal X : Std_Logic_Vector(9 DownTo 0) := "0110010000"; -- 400
Signal Y : Std_Logic_Vector(8 DownTo 0) := "001100100"; -- 100

Begin

-- Para que no queden sín usar; no me gustan los warnings ;)/ I don't like warnings ;)
Led0 <= Btn1;
Led1 <= Clk50;

-- Mapeo ROM / Rom map
MiRom : Entity Work.Rom
Port Map (
    clka => Clk14,
    addra => SprAddr,
    douta => Color
);

ExtN <= Color;

-- Tratamiento sincronismos / sync management
Sync: Process(Clk14)
Begin
If Rising_Edge(Clk14) Then
-- Contador horizontal / horizontal counter
If (LatchH = '1') And (HSync = '0') Then
CuentaH <= (Others => '0');
-- Contador vertical / vertical counter
If (LatchV = '1') And (VSync = '0') Then
CuentaV <= (Others => '0');
Else
CuentaV <= Std_Logic_Vector(UnSigned(CuentaV)+1);
End If;
LatchV <= VSync;
Else
CuentaH <= Std_Logic_Vector(UnSigned(CuentaH)+1);
End If;
-- Latcheo de sincronismos / Syncs latch
LatchH <= HSync;
End If;
End Process;

-- Dibujo sprite / drawing the sprite
Sprite: Process(Clk14)
Begin
If Rising_Edge(Clk14) Then
If (Unsigned(CuentaV)>=Unsigned(Y)) And (Unsigned(CuentaV)<Unsigned(Y)+64) Then
If (Unsigned(CuentaH)>=Unsigned(X)) And (Unsigned(CuentaH)<Unsigned(X)+128) Then
-- Transparencia  / transparency
If (Btn0 = '0') And (Color = "0000") Then
ExtC <= '1';
Else
ExtC <= '0';
End If;
-- Dirección  / address
SprAddr <= Std_Logic_Vector(UnSigned(SprAddr)+1);
Else
ExtC <= '1';
End If;
Else
ExtC <= '1';
SprAddr <= (Others => '0');
End If;
End If;
End Process;

-- Movimiento / movement
Joystick: Process(Clk14)
Begin
If Rising_Edge(Clk14) Then
If (LatchH = '1') And (HSync = '0') Then
If (LatchV = '1') And (VSync = '0') Then
If (Joy(0) Xor Joy(1)) = '1' Then
If Joy(0) = '0' Then
X <= Std_Logic_Vector(UnSigned(X)+2); -- Horizontal is slower than vertical movement
Else
X <= Std_Logic_Vector(UnSigned(X)-2);
End If;
End If;
If (Joy(2) Xor Joy(3)) = '1' Then
If Joy(2) = '0' Then
Y <= Std_Logic_Vector(UnSigned(Y)+1);
Else
Y <= Std_Logic_Vector(UnSigned(Y)-1);
End If;
End If;
End If;
End If;
End If;
End Process;

End Behavioral;

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: External colour tests
« Reply #25 on: 2018.July.10. 13:23:00 »
promising :smt041

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #26 on: 2018.July.11. 22:37:58 »
I have loaded another mask, guess it....:

[ Guests cannot view attachments ]

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: External colour tests
« Reply #27 on: 2018.July.12. 08:40:09 »
I have loaded another mask, guess it....:
:ds_icon_cheesygrin: :ds_icon_cheesygrin:

Online gflorez

  • EP addict
  • *
  • Posts: 3607
  • Country: es
    • Támogató Támogató
Re: External colour tests
« Reply #28 on: 2018.July.26. 11:45:12 »
I want to open here a small debate about how to take real advantage of the colour input.

What uses could it have?

I think it is easy and perfect for overlaying on the screen any external information. Think for example on a Gotek or HxC connected to the EXDOS without the little screen, instead the image disk information shown on the Enterprise screen. Or I also have though about the external screen on the Dream Turbo Card from Pear. He has took it in consideration, but not for the present version.

Theoretically, several video inputs can coexist at the same time if they are protected with diodes. I want to test this, but at the moment I only have one way to inject colour.

Of course I don't forget the initial purpose of the colour input... a hardware sprite generator or video input. Using the same system that my friend has used to add colour to the only green PCW Amstrad computer, can serve to easy inject a digital video source, but I think it would be very limited quality due the way the 8 high colours of the palette have been implemented, through the Nick register Bias.

Soon(I still don't know when...) I will receive a GFX-NINE from TMTLogic. It is a clone of the renowned Sunrise GFX-9000 MSX graphics cartridge that Prodatron supports on the MSX, and now CPC, versions of SymbOS. Sure it will work on the Enterprise interfaced with the M-Slot, but new software has to be written for it, or at least adapted. The Z80 ports it uses have not been used before on any Enterprise hardware extension, so this is new terrain.... Hans says that this is not a straight copy of the classic GFX-9000 card, it has been completely redesigned and fixed maintaining its original operation.

As you already know, this cartridge uses its own video output, but the V9990 chip has a few interesting modes that can suit our Enterprises if we discover a way to digitise the output video. Also, a interesting characteristic of the chip is that it accepts superimposing an external video output.... Think, not on injecting colour to the Enterprise, but injecting the Enterprise output video signal on the V9990... But this is nothing more than a dream by now...

Returning to the Hardware Sprite Generator and the basic tests shown in this thread, you must understand that they will not go further than to understand completely the mechanism. But... it may be we can find an easy way to inject the whole screen of the V9990 in pattern mode P2(see the data sheet page 13), offering 128 sprites on 16 colour, more than 15000 8x8 pixel tiles and omnidirectional scroll....
« Last Edit: 2018.July.26. 11:52:06 by gflorez »

Offline pear

  • EP lover
  • *
  • Posts: 825
  • Country: pl
  • Z80 only
    • Támogató Támogató
Re: External colour tests
« Reply #29 on: 2018.July.26. 12:17:27 »
I think it is easy and perfect for overlaying on the screen any external information. Think for example on a Gotek or HxC connected to the EXDOS without the little screen, instead the image disk information shown on the Enterprise screen. Or I also have though about the external screen on the Dream Turbo Card from Pear. He has took it in consideration, but not for the present version.
You inspired me and I am just thinking about the OSD module, connected instead of the LCD display :)

I'm still wondering how to mix several external video signals (priorities, layers ?).