Frankie Kam
137 followers -
Christian Lecturer at Cambridge English For Life, Malaysia. Loves.... no, crazy about Moodle.
Christian Lecturer at Cambridge English For Life, Malaysia. Loves.... no, crazy about Moodle.

137 followers
Posts
Post has attachment
I am using 16 bit x86 ASM with a 1994-era (don't laugh) MASM.
I have a variable named Roll that goes from 0 to 511.
See the roll variable in this Youtube video: https://youtu.be/T7Tz-vXUHo8 (if you play this video in full-screen, please set Quaity to 240p)
In the video you can see the ROL(L) value at the bottom status bar changing from 0 to 511 as I bank the plane clockwise, and from 511 to 0 as I bank in the opposite direction, which is anticlockwise.
What I am trying to do is to show a Roll Indicator.
What I need is to convert the value 0...511 to this:-
when rolling to the left the value should go from 1..180 [i.e, "1° L" to "179°L then 180°L/R for being fully inverted (=upside down)] and from 1..180 ["1° R" to "179° R"] for all the states being rolled to the right side of roll axis.

So basically I want to convert the values 0..511 to 1..180 (or to 0..179). Any ideas how I can do this?
Post has attachment
Haha! 4 months ago I hadn't compiled a line of 16-bit ASM in like 27 years. Then this happened. http://dogsofwarvu.com/forum/index.php/topic,5046.15.html
This is what you get when you add passion for a game + lots of persistence + time.
dogsofwarvu.com
Sorry for the newbie (nube?) question about division of two numbers in assembly language, but here's my question:

;Assuming cx stores the variable "z eye". How do I convert
;the below code from this:-
;
mov bp,cx ;bp = z eye
sar bp,1 ;bp = z eye / 2
shl cx,1 ;cx = z eye * 2
add cx,bp ;cx = z eye * 5 / 2

to this:-

mov bp,cx ;bp = z eye
...(N lines of code)...
add cx,bp ;cx = z eye * 6 / 5

I signed up for a Udemy assembly language course. 32 bit stuff. Why? Because I am slowly enhancing my favorite retro DOS flight simulator - Tornado - by tweaking the assembly language source code. Code was originally written in 1993 and compiled using MASM 6.11. Mostly baby steps for me, and you can see my beginner handiwork here at http://dogsofwarvu.com/forum/index.php?topic=5046.0
It might take me 5-10 years to learn up assembly language part-time, but it will be worth the effort because #1 Tornado is a kick-s simulator; #2 I'm still in email communication with the original programmer of the 3D simulation portion of the game, and #3 because...it's there.
Post has attachment
View PDF files in a ShadowBox pop-up window in the Essential Theme on your Moodle 3.0 site (works on all other themes as well!)
Source: Jens Peter Olesen, Pixabay, CC0 Public Domain Design . It's all about design. Today's post is  a sequel to my earlier post on the same subject. In that post, I enabled my PDF and ODF files to open in a Lightbox-like window, when clicked upon, in thr...
Post has attachment
HOW I USED PCem TO CREATE A VIRTUAL 486 PC. Now I can enjoy playing Tornado on it!
Tags: virtualisation, PC emulation, reviving them olde dead games, PCem, DOSBox, Tornado flight sim, high fidelity sound, pure Voodoo graphics, leave your dusty outdated PC in the attic, maximum coolness, extreme awesomeness EXECUTIVE SUMMARY I don't have m...
Post has attachment