Closed MJoergen closed 1 year ago
When implementing this feature we should also show the CORE's name/version together with the input core screen resolution. I will take this info from config.vhd
and combine it with the info described above.
Please also add the following:
@0x7009
.@0x7009 / @0x7008
. Should preferably be rounded to one decimal (as opposed to just displaying an integer).Should preferably be rounded to one decimal
@MJoergen As you are the math wizard: QNICE does not have any floating point maths. Can you help me with a simple floating point algorithm either written in C or in QNICE assembly (latter one preferred since a lot is on my plate for the release)? These are the operations that we have: 32bit multiplication, 32bit division, 3bit addition, 32bit subtraction.
Just for the record, these are all the variables provided:
Should preferably be rounded to one decimal
@MJoergen As you are the math wizard: QNICE does not have any floating point maths. Can you help me with a simple floating point algorithm either written in C or in QNICE assembly (latter one preferred since a lot is on my plate for the release)? These are the operations that we have: 32bit multiplication, 32bit division, 3bit addition, 32bit subtraction.
Ok, then I suggest we for now just forget the floating point and just print out the result of integer division.
For some later project, I suggest we add a more general floating point library to QNICE.
For the record, one algorithm to achieve the requested "division rounded to one decimal" is the following:
x/y
rounded to 1 decimal place.(10*x) / y
. Call this number z
.z/10
and display it. This is the integer part of the result.z - 10*(z/10)
and display it. This is a digit from 0 to 9, and is the first decimal digit.I've changed the register yet again, so that they now match the parameters found in M2M/vhdl/av_pipeline/video_modes_pkg.vhd
:
I suggest you just display these raw values in decimal, without any further post-processing.
For the user it is relevant to be able to determine the following derived quantities:
H_FREQ / (V_PIXELS + V_PULSE + V_BP + V_FP)
H_FREQ * (H_PIXELS + H_PULSE + H_BP + H_FP)
Perhaps displaying V_TOTAL = V_PIXELS + V_PULSE + V_BP + V_FP
and H_TOTAL = H_PIXELS + H_PULSE + H_BP + H_FP
would be nice for the user.
Done with this commit: 98f4fe8c1505bbace1501bb0a3c9608492c96188
The M2M framework now automatically detects the screen resolution (i.e. visible pixels) received from the CORE. Inside the "monitor" this can be retrieved as follows:
The above is from the C64MEGA65 core, and shows that the horizontal size is 0x0180 = 384 pixels, while the vertical size is 0x010E = 270 lines.
This information should also be available without having to enter the "monitor". E.g. either displayed to UART upon start-up, and/or visible somewhere in the OSM.