-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: split video.c #331
Comments
and yes ... even the memory save can be cleanly abstracted
|
Just a quick suggestion: the labeling on the Commander X16 prototype itself (which can be seen in this video) refers to the VERA board as a "module," so you may want to consider changing the terminology used in the code. |
I was struggling with that ... VERA is referred to as a module. at this module has multiple capabilities: ps/2 ports, sound, video. my issue was that looking at the code in the emu it looks like they are also not following the extension cards model they have devised for x16. For eg: the PS2 ports are exposed through VIA2 while the video card is connected through memory mapped ports. So I am not sure what a module is, if it is anything connected via port mapping or .... as this was not clear, I was trying to follow the naming conventions inside the source code ... .. and nothing in there refers to the things that are mem mapped. there is just a bunch of code that compares 'magic' addresses. if someone decide on a nomenclature, I will happily follow it. In the meantime, I will test a 2 vera_video config ... where the second one will only be known via its memory mapped registers.... and then, a more ambitious step will be to ..... :) |
VERA handles SPI not PS/2. |
hmm ... .. for some reasons I was under the impression that VERA was where the PS/2 ports where located. ... but I am glad to be wrong. so, if I may ask: what are the features that are for sure located on the VERA board? I believe sound is there. of course video is there too... last I understood, the RTC was now accessible via SPI.. which means that it is on VERA too? ... I am looking at a photo of the blue photo (v2) ... from the top, looking left to right:
then towards the back of the card
from what I could gather VERA is not behind a VIA but directly connected to the bus .. which reinforce my assumption that there is a CS in the header to activate the mem mapped registers. ... anywho ... I hope to be able to test dual screen support today or tomorrow... then will come the harder step... |
VERA is now a standalone c library. the code uses the standard approach of exporting a 'blind' (handle-like) typedef for the internals of the video card and define a separate struct where the real state is stored. I have video.c starting with 2 separate SDL windows each running their own separate video card. cleaning up the memory mapped area code makes it trivial to defined these things (could do it in JSON) ... |
Video.c contains really 2 different layers of code:
proof that they do not belong together? even though there are some scared related call inside video.c, the bulk of the scared code is not inside video.c
so ... following that logic, this is about creating vera_video.h/vera_video.c
Your code is so well written that I did it yesterday afternoon without any problems whatsoever, in the process creating a new struct to describe the card:
and yes ... the work of malloc-ing the data is not complete.
so this proposal is
I promise... there is a real reason for doing all this
The text was updated successfully, but these errors were encountered: