Work or Fun with Graphics , TV AND VGA. (Is this "new"?)
VIRAND
Posts: 656
I added nothing to this. Its only Chip's old code. I bent his GRAPHICS DEMO by removing the mouse stuff,
pasting part of TV demo code to an old VGA version. I wouldn't be surprised if he did this before and is
embarrassed at what I did. I think all the drivers are included with Propeller Tool,
(note for BST and SPHINX). I picked colors that look similar on VGA and TV(*).
After commenting out the mouse stuff I changed a few minor details to make it still look interesting.
It took a very short time; a few hours (and I'm slow). I'm not even familiar with the VGA driver yet.
I commented the code and it maybe a good place to start to write code with dual display option.
As is, it will output simultaneously to TV and VGA on Demo Board if both screens are connected,
using the same format. My monitor would turn off if I changed VGA parameters, so I couldn't
fill the whole VGA screen, but it should only have to run slower to do that. If there is
another program that runs two different video outputs, say so. I didn't waste much time.
It seems like people have been asking about this and not been answered. These days, people are
throwing away virus-infested computers with working screens AND analog TVs in my area almost every day
so it is possible to find a spare video screen of either type.
PAL Spinners should have no problem using their own GRAPHICS compatible TV drivers.
I am surprised that some people have said here in the past that it is not possible to have a
full color VGA GRAPHICS driver because VGA is too fast. I think the old VGA driver uses one cog,
maybe it uses two. Say something if Propeller Tool doesn't have all the drivers.
Two needed improvements may be separated Colors[noparse]/noparse LUTs, and making the VGA image fill the whole screen.
Is spin file really attached? I can't see it yet. Weird. If not I'll try again. (Still working on it, trying again...)OK, I think,
One of my next projects may be a demo of some or all of the Public Domain 3DTV systems from the
1900s that will soon be sold. So hop into the DeLorean and go Back to the Future with me to where Doc Brown
first installed his Flux Capacitor in it, and grab a pair of these Sega 3D Glasses, and play some Rescue on Fractalus,
featuring THX. (30,000 lines of C according to the USPTO, which somehow fits in 32K with the rest of the game).
www.old-computers.com/MUSEUM/hardware.asp?t=1&c=840&st=2
"VIeRidiAN Dynamics. LIFE. BETTER."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
you'd have tons of awesome code to post! (Note to self)
Post Edited (VIRAND) : 1/12/2010 2:39:31 AM GMT
pasting part of TV demo code to an old VGA version. I wouldn't be surprised if he did this before and is
embarrassed at what I did. I think all the drivers are included with Propeller Tool,
(note for BST and SPHINX). I picked colors that look similar on VGA and TV(*).
After commenting out the mouse stuff I changed a few minor details to make it still look interesting.
It took a very short time; a few hours (and I'm slow). I'm not even familiar with the VGA driver yet.
I commented the code and it maybe a good place to start to write code with dual display option.
As is, it will output simultaneously to TV and VGA on Demo Board if both screens are connected,
using the same format. My monitor would turn off if I changed VGA parameters, so I couldn't
fill the whole VGA screen, but it should only have to run slower to do that. If there is
another program that runs two different video outputs, say so. I didn't waste much time.
It seems like people have been asking about this and not been answered. These days, people are
throwing away virus-infested computers with working screens AND analog TVs in my area almost every day
so it is possible to find a spare video screen of either type.
PAL Spinners should have no problem using their own GRAPHICS compatible TV drivers.
I am surprised that some people have said here in the past that it is not possible to have a
full color VGA GRAPHICS driver because VGA is too fast. I think the old VGA driver uses one cog,
maybe it uses two. Say something if Propeller Tool doesn't have all the drivers.
Two needed improvements may be separated Colors[noparse]/noparse LUTs, and making the VGA image fill the whole screen.
Is spin file really attached? I can't see it yet. Weird. If not I'll try again. (Still working on it, trying again...)OK, I think,
One of my next projects may be a demo of some or all of the Public Domain 3DTV systems from the
1900s that will soon be sold. So hop into the DeLorean and go Back to the Future with me to where Doc Brown
first installed his Flux Capacitor in it, and grab a pair of these Sega 3D Glasses, and play some Rescue on Fractalus,
featuring THX. (30,000 lines of C according to the USPTO, which somehow fits in 32K with the rest of the game).
www.old-computers.com/MUSEUM/hardware.asp?t=1&c=840&st=2
"VIeRidiAN Dynamics. LIFE. BETTER."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
you'd have tons of awesome code to post! (Note to self)
Post Edited (VIRAND) : 1/12/2010 2:39:31 AM GMT
Comments
Please show me that version since it fits both drivers and the mouse and all of the graphics demo, which I couldn't do.
Can't see why you could not have both VGA and TV drivers running from the same bitmap buffer though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
I re-enabled the mouse driver and compiled it with bst using "unused spin method removal" in the compiler options. It compiled with 32 longs available (after taking into account the reserved space for the buffers and 100 longs of stack).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
But did you restore the mouse-driven parts of the graphics demo that I commented out?
Not only did I run out of memory, I also got a corruption of the first tiles of the bitmap with part of the program.
What part was unused and removable? I'll try the alternative compilers very soon.
Assuming I will have the same problem with your fix, Can you post a fully functional binary at least?
I guess so far it does look like the GRAPHICS demo can run on both types of screen at the same time,
and nobody else showed it had been done before, although I thought for sure Chip must have done it like this.
Post Edited (VIRAND) : 1/13/2010 5:43:42 AM GMT
Yes.
I could not find a VGA lead to test with (all my stuff is either DVI or a laptop), but I'd guess it works. I finally found a PS2 mouse in a box, so that works too.
It looks like the top left hand tile is corrupt on startup, but I don't know if thats an artifact of stack smashing or something you've done when you've modified the code.
The colours are different to the original demo also. Lots of reds where there used to be greens.
<edit>
To answer your other question, it looks like Quad() and Finish() in Graphics.spin are not referenced. Quad() references Tri() so by eliminating those three you gain 3 longs (headers) + 198 bytes (bytecode) or 52 longs.
Given the error message says "Binary too large for RAM by 51 Longs" it looks like we win.
The "fast constants" optimisation costs us 2 longs.
"Fold constants" buys us 4 longs.
Recompiling with "fast constants" disabled makes the corrupt bit of the top tile smaller, so the corruption is certainly a stack smash.
Need to reduce the memory consumption by about another 5-10 longs by the looks of things.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
Post Edited (BradC) : 1/13/2010 8:47:02 AM GMT
The colors had to be different because the color codes for different screens don't ever match. I chose sort of close ones on the OP program.
I didn't provide the drivers so I couldn't mod them to use separate palettes which would have needed more memory anyway.
Thanks for the files and trying the code. I'm surprised the program still works with a corrupted stack.
Also. VIRAND does not really exactly stand for Viridian Dynamics but the joke is the words and logos are close enough.
Veridian Dynamics is a fictional conglomerate that does similar weird science, and has funny ads on ABC-TV.
Similar enough to say we are them while the ads are good and funny, different enough to not be them if the ads become evil.
They have their own website, and their ads are also on Youtube, and they don't sell anything, but they make me laugh.
It was inevitable with billions of people and only a million words to say.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
VIRAND, If you spent as much time SPINNING as you do Trolling the Forums,
you'd have tons of awesome code to post! (Note to self)
It's not corrupting the stack. The stack is corrupting the graphics. It would appear the stack pokes out into the graphics bitmap and then retreats back again before anything in the graphoics code writes to those particular longs (otherwise things would get messy). I've not investigated it much further, although I've made some pretty horrific "optimisations" to the spin code to reduce the code size and stack usage on some calls. I've pared another 6 longs out of it (without altering the functionality) and the corruption is just a tiny spec in the top corner now. The problem is the "optimisations" make the code *much* harder to follow.
Interesting. My consulting company is Viridian. I've been using it in the Middle East since 2005 and Australia since early last year. Not to indicate we're green or anything.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.