addon for the MMVGD game driver
GKCS
Posts: 10
Hi all,
I am just playing around with the fantastic MMVGD system. This system can be used for much much more than only writing games. For different cases, it is great to have a more·user-controled·numbers output.
For this case, I just did a little replacement of the ValueDec and ValueInc sub's.
SetText can handle·a 5 digits number in the range of a word variable.
SetText Col,Val
0<=Col<=15
0<=Val<=65535
The output is at row 0 and uses the Row0 TileSet
This sub can easily be modified, to output numbers also at row 1 to 10
st_tmp1·var word
st_tmp2·var byte
st_tmp3·var word
st_x····· var byte
SetText·sub 3
SetText:
·· st_x···· = __Param1
· ·st_tmp1 = __WPARAM23
· ·for st_tmp2=0 to 4
· ··lookup st_tmp2,10000,1000,100,10,1,st_tmp3
· ··st_tmp1 = st_tmp1/st_tmp3
· ··st_tmp3 = __wremainder
· ··PutTile st_x,0,st_tmp1_LSB
· ··st_tmp1 = st_tmp3
·· ·inc st_x
· ·next st_tmp2
· ·Return
Have fun with this lil code
Gerry
I am just playing around with the fantastic MMVGD system. This system can be used for much much more than only writing games. For different cases, it is great to have a more·user-controled·numbers output.
For this case, I just did a little replacement of the ValueDec and ValueInc sub's.
SetText can handle·a 5 digits number in the range of a word variable.
SetText Col,Val
0<=Col<=15
0<=Val<=65535
The output is at row 0 and uses the Row0 TileSet
This sub can easily be modified, to output numbers also at row 1 to 10
st_tmp1·var word
st_tmp2·var byte
st_tmp3·var word
st_x····· var byte
SetText·sub 3
SetText:
·· st_x···· = __Param1
· ·st_tmp1 = __WPARAM23
· ·for st_tmp2=0 to 4
· ··lookup st_tmp2,10000,1000,100,10,1,st_tmp3
· ··st_tmp1 = st_tmp1/st_tmp3
· ··st_tmp3 = __wremainder
· ··PutTile st_x,0,st_tmp1_LSB
· ··st_tmp1 = st_tmp3
·· ·inc st_x
· ·next st_tmp2
· ·Return
Have fun with this lil code
Gerry
Comments
· Nice code. Good use of variables.
· Are you using the MMVGD for anything non-game ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
There are only two guaranteed ways to become weathy.
Spend less than you make.
Make more than you spend.
·
indeed yes. I have some ideas for another usage besides games. I am just struggeling around for a way, to handle data from an external source, which won't influence the video-interrupting.
With a lil tricking, you can use a horizontal resolution of 128 bars or 88 bars vertically. Much enough for any kind of e.g. grafical analyzing screens ....
Many greetings
Gerry