TTL VIC-II, some ideas
Re: TTL VIC-II, some ideas
Cray Ze, to you it's obvious what you are doing there, but for us I think it isn't.
Would be awfully nice if you could just add a little bit of text to this screenshot.
Hmm... when looking at that screenshot...
If one would have a character set with all characters rotated by 90 deg.,
and if one would build the ROW and COLUMN counters etc. a bit different to make them run a different video address sequence,
I think it might be possible to display an entire text screen rotated by 90 deg., that's 40 lines of text, 25 characters per line.
Might be fun when writing code in assembly on such a screen...
after manually turning your TV set by 90 deg., that is.
Sprites won't be displayed rotated, of course.
Would be awfully nice if you could just add a little bit of text to this screenshot.
Hmm... when looking at that screenshot...
If one would have a character set with all characters rotated by 90 deg.,
and if one would build the ROW and COLUMN counters etc. a bit different to make them run a different video address sequence,
I think it might be possible to display an entire text screen rotated by 90 deg., that's 40 lines of text, 25 characters per line.
Might be fun when writing code in assembly on such a screen...
after manually turning your TV set by 90 deg., that is.
Sprites won't be displayed rotated, of course.
Re: TTL VIC-II, some ideas
ttlworks wrote:
Cray Ze, to you it's obvious what you are doing there, but for us I think it isn't.
Would be awfully nice if you could just add a little bit of text to this screenshot.
Would be awfully nice if you could just add a little bit of text to this screenshot.
I implemented many of the ideas mentioned previously in the thread, just not in TTL.
Quote:
Hmm... when looking at that screenshot...
A 40x25 window into an 80x50 memory space/screen. The 40x25 can scroll about the 80x50 but in this case it's at the bottom right extent,
this is entirely because the data in my 80x50 screen memory consists of the spicing of four screens created in an online (40x25) PETSCII editor.
Along with the 80x50 screen memory, there is a matching 80x50 attribute memory. The character set is obtained from an image of the standard
C64 character generator ROM, there are no redefined chars. All attributes are applied on the fly.
I implemented XFLIP, YFLIP, ROTATE RIGHT 90, UPPER/LOWER CASE attributes. I hadn't gotten around to INVERSE text before putting the design
down for a while, but it's easy, the hardware cursor already uses the principle.
Rotation is easy enough but requires a lot of memory access, though the whole design runs the high memory access rate so at least nothing special
has to be done for a rotate. A pixel is a single bit, so if you're accessing ram at the pixel clock frequency, you're only ever interested in a single pixel.
Just exchange the vertical and horizontal counter bits used in the character decode and there is your rotation, on the fly, we don't care about the other
bits in the addressed byte.
Quote:
If one would have a character set with all characters rotated by 90 deg.,
and if one would build the ROW and COLUMN counters etc. a bit different to make them run a different video address sequence,
I think it might be possible to display an entire text screen rotated by 90 deg., that's 40 lines of text, 25 characters per line.
Might be fun when writing code in assembly on such a screen...
after manually turning your TV set by 90 deg., that is.
with selectable start address and both HEX and disassembly display modes. On the fly, not even a CPU
I could combine them....hmmmm. Whooops, wandering off topic again.
Edit: Actually a full screen rotated mode (and monitor on it's side) might not be such a silly idea for arcade style games.
Here is the same screen in the PETSCII editor, before exporting and splicing.
Colour translates nicely to attributes, except for when it's the same as the screen colour.
I had to massage the attribute output before using it as I'd used the wrong colours, search and replace in a text editor did the trick.
Link to mentioned editor:
http://petscii.krissz.hu/
- Attachments
-
- Screen created in online PETSCII editor.
- PETSCIIed_2017-10-25 03-24-11.png (7.79 KiB) Viewed 2836 times
Re: TTL VIC-II, some ideas
Cray Ze wrote:
Rotation is easy enough but requires a lot of memory access, though the whole design runs the high memory access rate so at least nothing special
has to be done for a rotate. A pixel is a single bit, so if you're accessing ram at the pixel clock frequency, you're only ever interested in a single pixel.
has to be done for a rotate. A pixel is a single bit, so if you're accessing ram at the pixel clock frequency, you're only ever interested in a single pixel.
Cray Ze wrote:
I actually have an FPGA based 6502 dissembler that decodes memory straight into 6502 assembly listing on a VGA screen,
with selectable start address and both HEX and disassembly display modes. On the fly, not even a CPU
I could combine them....hmmmm. Whooops, wandering off topic again.
with selectable start address and both HEX and disassembly display modes. On the fly, not even a CPU
I could combine them....hmmmm. Whooops, wandering off topic again.
Cray Ze wrote:
Link to mentioned editor:
http://petscii.krissz.hu/
http://petscii.krissz.hu/
but now I started to wonder, for what exactly a text editor aiming at PET\C64 needs Google analytics, googleapis and paypalobjects.
Re: TTL VIC-II, some ideas
ttlworks wrote:
Cray Ze wrote:
Rotation is easy enough but requires a lot of memory access, though the whole design runs the high memory access rate so at least nothing special
has to be done for a rotate. A pixel is a single bit, so if you're accessing ram at the pixel clock frequency, you're only ever interested in a single pixel.
has to be done for a rotate. A pixel is a single bit, so if you're accessing ram at the pixel clock frequency, you're only ever interested in a single pixel.
in your calcs, your result will be 300% too high. I should have said 'pixel rate' instead of 'pixel clock' for ram access though.
I'm using a higher res video mode than needed, though that's just personal preference for the mode.
I'm using 800x600@72Hz (50 MHz clk) with a pixel rate of half the pixel clock to simulate 400 x 300 so RAM access is at 25MHz.
You could use 640x480@60Hz (25 MHz clk), and RAM access will be at 12.5 MHz.
Quote:
Cray Ze wrote:
I actually have an FPGA based 6502 dissembler that decodes memory straight into 6502 assembly listing on a VGA screen,
with selectable start address and both HEX and disassembly display modes. On the fly, not even a CPU
I could combine them....hmmmm. Whooops, wandering off topic again.
with selectable start address and both HEX and disassembly display modes. On the fly, not even a CPU
I could combine them....hmmmm. Whooops, wandering off topic again.
hardware, but it's only ever been a thought. I wonder how small the remaining ROM could be?
Quote:
Cray Ze wrote:
Link to mentioned editor:
http://petscii.krissz.hu/
http://petscii.krissz.hu/
but now I started to wonder, for what exactly a text editor aiming at PET\C64 needs Google analytics, googleapis and paypalobjects.
reports suggesting as such. It could be that the author coded in the option to turn it into a pay app, though unlikely. It's possible that it was
developed with a framework that is also used to develop paid applications and it's inserted by default regardless.
EDIT: I just noticed it has a 'Donate' button in the bottom left corner. That's probably a fair enough explanation.
When using the editor it did occur to me that it would be quite simple to re-implement the whole thing in VHDL with the modifications I needed,
those being 80x50 mode and my new attributes. Most of what's required is already covered in the current design anyway, just a case of throwing
in a couple graphical selectors, or make them drop down tabs, wire up some input devices (which I really should do anyway) and think of a method
to get the data out, maybe spew it out through a UART in nice ASCII encoded HEX.
Re: TTL VIC-II, some ideas
Pretty sure that if we can afford the latency of 40 chars, we don't need the high RAM access rates, and can divide those figures by 8. Just need to think about implementation.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
Re: TTL VIC-II, some ideas
Cray Ze wrote:
so if you have 4 x anything in your calcs, your result will be 300% too high.
Cray Ze wrote:
I've thought about simplifying something like a C64 KERNAL ROM by shifting most of the functions to hardware,
but it's only ever been a thought. I wonder how small the remaining ROM could be?
but it's only ever been a thought. I wonder how small the remaining ROM could be?
Serial IEC bus routines are timing critical and better should stay 6502 code.
The Kernal won't have to emulate an UART when just adding UART hardware to the system.
The rest is somewhat "debatable"... when debating about compatibility to existing code (which makes use of the kernal routines) first.
...You could try to build a "custom" 6502 core in VHDL that also runs BASIC tokens as "Bytecode" and does floating point math by hardware.
Cray Ze wrote:
EDIT: I just noticed it has a 'Donate' button in the bottom left corner. That's probably a fair enough explanation.
Suddenly, internet seems to make sense again.
Cray Ze wrote:
Most of what's required is already covered in the current design anyway, just a case of throwing in
a couple graphical selectors, or make them drop down tabs
a couple graphical selectors, or make them drop down tabs
Cray Ze wrote:
Pretty sure that if we can afford the latency of 40 chars, we don't need the high RAM access rates, and can divide those figures by 8.
Cray Ze wrote:
Just need to think about implementation.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
Just post your idea, so we can see what could be done.
Re: TTL VIC-II, some ideas
ttlworks wrote:
Cray Ze wrote:
so if you have 4 x anything in your calcs, your result will be 300% too high.
Cray Ze wrote:
I've thought about simplifying something like a C64 KERNAL ROM by shifting most of the functions to hardware,
but it's only ever been a thought. I wonder how small the remaining ROM could be?
but it's only ever been a thought. I wonder how small the remaining ROM could be?
Serial IEC bus routines are timing critical and better should stay 6502 code.
The Kernal won't have to emulate an UART when just adding UART hardware to the system.
The rest is somewhat "debatable"... when debating about compatibility to existing code (which makes use of the kernal routines) first.
Quote:
...You could try to build a "custom" 6502 core in VHDL that also runs BASIC tokens as "Bytecode" and does floating point math by hardware.
Quote:
Cray Ze wrote:
Pretty sure that if we can afford the latency of 40 chars, we don't need the high RAM access rates, and can divide those figures by 8.
Quote:
Cray Ze wrote:
Just need to think about implementation.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
This would prevent another idea from working though (needs the fast access), which would be a shame, I was thinking the 80 x 50 should have sub-pixel smooth scrolling,
rotating and zooming within the displayed 40x25 window (screen). Probably getting to big for TTL, that's a lot of adders.
Just post your idea, so we can see what could be done.
into an 80 x 50 addressable space, the expansion of bits in X and Y will give me the subpixel rotation and scaling I want. Sounds fine in theory.....
Re: TTL VIC-II, some ideas
Cray Ze wrote:
If I was to design a BASIC interpreter in VHDL, there would be no CPU, so it probably wouldn't be relevant to the forum.
In BASIC mode, the CPU executes BASIC tokens as sort of a "Byte code"... until it fetches a special BASIC token (something like 'sys') that puts the CPU
back into using the 6502 instruction set.
This way, you wouldn't have to implement the complete BASIC interpreter in VHDL, and there would be a chance of mixing BASIC and 6502 machine code
in the same program. //Ain't exactly like using "inline assembly"...
Hey, an ARM with integrated hardware Java Bytecode interpreter still counts as an ARM, so a 6502 with an integrated "BASIC interpreter subset"
still counts as a 6502 (and IMHO still would be relevant to the forum).
Cray Ze wrote:
The idea is to increase the X and Y pixel counters to somewhere between 19 and 24 bits,
ADSP21065L manual, page 165.
Now let's suppose, one would try to modify the DAG concept to use it as ROW\COLUMN counter when fetching data to be displayed from screen memory...
Re: TTL VIC-II, some ideas
I'll look at that 780 page datasheet soon, for now I've got to go feed some lizards.
I just though I'd post I've remapped onto a virtual plane and it works.
I was quite a way off with the bit requirements, I forgot about the multiplying effect.
19 bits would have lead to (1111111111111111111 x 1111111111111111111). That's 2.537329231×10⁴³ pixels, in both X and Y, whoops!!
For reference, the diameter of the observable universe is only 8.8 × 10²⁹mm in comparison.
The 16 Bits I'm using is overkill.
I just though I'd post I've remapped onto a virtual plane and it works.
I was quite a way off with the bit requirements, I forgot about the multiplying effect.
19 bits would have lead to (1111111111111111111 x 1111111111111111111). That's 2.537329231×10⁴³ pixels, in both X and Y, whoops!!
For reference, the diameter of the observable universe is only 8.8 × 10²⁹mm in comparison.
The 16 Bits I'm using is overkill.
Re: TTL VIC-II, some ideas
Cray Ze wrote:
I'll look at that 780 page datasheet soon,
Take care that your brain won't go into overflow.
Only page 165..181 would be relevant, that's 16 pages.
Cray Ze wrote:
for now I've got to go feed some lizards.
Cray Ze wrote:
For reference, the diameter of the observable universe is only 8.8 × 10²⁹mm in comparison.
Re: TTL VIC-II, some ideas
ttlworks wrote:
Cray Ze wrote:
for now I've got to go feed some lizards.
Quote:
Cray Ze wrote:
For reference, the diameter of the observable universe is only 8.8 × 10²⁹mm in comparison.
Re: TTL VIC-II, some ideas
Cray Ze wrote:
Don't look at the background too closely, I've saved adjusting for my register delays until after feeding (lots more to go).
No lizards around me, only a cat:
Cray Ze wrote:
You think I should have extended to a full 24 Bits? 
Re: TTL VIC-II, some ideas
ttlworks wrote:
Cray Ze wrote:
Don't look at the background too closely, I've saved adjusting for my register delays until after feeding (lots more to go).
No lizards around me, only a cat:
Quote:
Cray Ze wrote:
You think I should have extended to a full 24 Bits? 
would require four multiplies to calculate the correct rotation angle, but this only has to be done once per angle change and
it's probably better to leave this to the CPU/programmer and keep the design within the possibilities of TTL. The rotation itself
doesn't use a multiply. I'm clocking the ROTO at the pixel clock, this turns some of the sub-pixels (virtual pixels) into real pixels,
effectively upscaling the resolution and decreasing jagged edges.
I fixed the timing so the glitches in the background of the lizard pics are gone. Locking the boarder to the rotoplane on the 40x25
window gives an interesting effect. I recall various flight sims and racing games that would shake the screen about when you crashed,
well, now the screen could be bounced about like a ping-pong ball, rotated, zoomed in/out or whatever.
Oh what a twisted path these pixels weave!
Re: TTL VIC-II, some ideas
Cray Ze wrote:
I see gravity isn't an issue for this special cat.
Cray Ze wrote:
The only multiply in the design is the x 80 mentioned previously. Getting the proper parameters to feed to the rotation unit
would require four multiplies to calculate the correct rotation angle, but this only has to be done once per angle change and
it's probably better to leave this to the CPU/programmer and keep the design within the possibilities of TTL. The rotation itself
doesn't use a multiply. I'm clocking the ROTO at the pixel clock, this turns some of the sub-pixels (virtual pixels) into real pixels,
effectively upscaling the resolution and decreasing jagged edges.
would require four multiplies to calculate the correct rotation angle, but this only has to be done once per angle change and
it's probably better to leave this to the CPU/programmer and keep the design within the possibilities of TTL. The rotation itself
doesn't use a multiply. I'm clocking the ROTO at the pixel clock, this turns some of the sub-pixels (virtual pixels) into real pixels,
effectively upscaling the resolution and decreasing jagged edges.
BTW: In TTL terms, multiplication could be done with a lookup table in a ROM.
For instance, an 8*8 Bit multiplication then would take 64kWords of ROM...
but there is a neat mathematical trick that would reduce the lookup table to 512 Words of ROM.
Cray Ze wrote:
I fixed the timing so the glitches in the background of the lizard pics are gone. Locking the boarder to the rotoplane on the 40x25
window gives an interesting effect. I recall various flight sims and racing games that would shake the screen about when you crashed,
well, now the screen could be bounced about like a ping-pong ball, rotated, zoomed in/out or whatever.
window gives an interesting effect. I recall various flight sims and racing games that would shake the screen about when you crashed,
well, now the screen could be bounced about like a ping-pong ball, rotated, zoomed in/out or whatever.
Cray Ze wrote:
Oh what a twisted path these pixels weave!
Re: TTL VIC-II, some ideas
ttlworks wrote:
Hmm... so I guess it's about more memory bandwidth... and about using parameters with a fractional part or such.
Yes, calculating the correct parameters requires multiplying by a sin/cos lookup table. The roto unit can also stretch X or Y and I'm pretty sure it can flip/mirror as well
so it's probably best to leave the programmer to decide the function. I'd leave the option for raw control even if adding the multiply function to the hardware.
Quote:
BTW: In TTL terms, multiplication could be done with a lookup table in a ROM.
For instance, an 8*8 Bit multiplication then would take 64kWords of ROM...
but there is a neat mathematical trick that would reduce the lookup table to 512 Words of ROM.
Quote:
Rotating a screen like that sure would be useful for a flight simulator... can you do this with sprites, too ?