Comments (10)
176 longs aren't as much as you think :) Which isn't to say that a driver couldn't be done in that space, I just haven't checked your code in that respect.
What is the timing like ATM? Could you potentially get away with only two scan lines which need buffering?
from jcap.
@konimaru That's the point I'm actually trying to highlight haha; 176 isn't that much space, so re-using initialization code space will help. Right now, the main driver code (sans initialization code) is ~134 longs, and that's without the sprite engine yet.
For 640 x 480 @ 60 Hz, the amount of time over 4 lines that the driver has available to populate the scanline buffer is ~127 microseconds. Best case scanario (all instructions take 4 cycles, so basically ignoring missed jumps and hub memory access) is I can execute 2,540 instructions during this time. Right now @ 40 tiles per scanline I'm at ~2,277 counting all instructions as 4 cycles; so honestly it's probably blowing it as is.
from jcap.
Going down to two lines per cog would rob me of two horizontal sync regions worth of buffer population time, so that's out since I'm already basically at capacity.
This is definitely an area of concern I'll have to address. The thing is though it's only an issue for 40 tile wide screens which is the highest I want to support (most games fall between 30 and 40). The next highest compatible width is 20 but that's honestly too low to make a respectable game from.
from jcap.
There are two possible branches to consider at this point:
- I go from 2 cogs/4 lines each to 4 cogs/1 line each, which would essentially give me 3 entire scan lines worth of time to generate the data for only one (instead of attempting to leverage the horizontal sync areas of 4 lines to find time for 4 lines worth of data).
or...
- I switch over to a method where there is no interlacing, there is only a cog dedicated to pulling in raw (i.e. already dereferenced from the tile map/palette and colored) video data from Main RAM which is populated by dedicated "render" cogs. This would result in essentially a "backwards" waitvid, where each long contains 4 8-bit pixels worth of data and I just print them sequentially. This means a LOT more waitvids per line, which means a much lower maximum horizontal video resolution of 256 pixels. Which, to be honest, isn't a deal-breaker as it's still a valid resolution displayable by VGA monitors AND it's actually closer to what classic arcade games displayed via CRT.
For now I'm going to keep working at the current paradigm and leverage some of Chip's high-res VGA driver tricks to see what I can squeeze into the driver in terms of instructions and out in terms of execution time per render.
from jcap.
Regarding 2, scanline drivers are available for up to 800 pixels per line (256, 320, 400, 800) so I wouldn't worry to much about it (someone else did all the work already).
from jcap.
Interesting, potatohead over at the Propeller 1 forum made it sound like 256 was the max resolution with that method
from jcap.
Don't know about that, I just have a 400x300 with overlay in front of me and it's doing fine :)
from jcap.
Haha well there you go. Then, honestly, that is probably going to be the next thing I do after I take a crack at wrapping up the current effort. Because, and this is a pretty big deal, when I add in sprites their pixel colors will be based on the palette of the tile they're in. This would limit me essentially to monochromatic backgrounds wherever a sprite might need to venture so that I could leave enough colors to define objects so that they don't look like trash haha
from jcap.
http://m.wolframalpha.com/input/?i=%2831.777557100298+us+*+4%29+%2F+10.4166667+nanoseconds
from jcap.
Made unecessary by dual-Propeller development.
from jcap.
Related Issues (20)
- Integrate stereo/mono pre-amp, RGBS, and coin counter circuits w/ schematics HOT 1
- Fix intermittent start-up video desync HOT 11
- Incorporate header files for constants HOT 1
- Elaborate on Video Part 3/4 Wiki Pages
- Update .io pages w/ Wiki info
- Refactor TX/RX handshake to encapsulate by modules HOT 1
- Implement sprite sizing HOT 16
- Implement horizontal fine pixel tile scrolling HOT 2
- Implement vertical fine pixel tile scrolling HOT 3
- Implement tile map scroll wrapping HOT 1
- Render cycle count improvements HOT 29
- Determine EEPROM Writing Solution HOT 8
- Optimize cog-hub scanline buffer transfer HOT 3
- Random stutter when scrolling HOT 1
- Replace sprite vertical wrapping magic number HOT 1
- Broken JAMMA links in wiki/README HOT 1
- Implement parallax scrolling HOT 6
- Implement full-featured gfx sys demo
- Fix CPU/GPU restart order bug HOT 1
- Implement GPU bank switching
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcap.