Search found 1578 matches

by tofro
Wed Jul 17, 2019 11:26 pm
Forum: Software & Programming
Topic: IP Device driver
Replies: 4
Views: 338

Re: IP Device driver

Please ignore me if I'm talking bollox, again, but, I did some network programming on Unix Norman, Not bollocks. But 68k is big-endian and network byte order is big endian - ntohx() and htonx() are no-ops on proper CPUs like the 68k, and you only really need to swap stuff around on systems like the...
by tofro
Tue Jul 16, 2019 5:32 pm
Forum: The Off-Topic Section
Topic: Welsh Meters
Replies: 7
Views: 430

Re: Welsh Meters

Secret attempt of Welsh world domination
by tofro
Fri Jul 12, 2019 10:16 am
Forum: Software & Programming
Topic: SCREEN1 = SYSVAR @ JSROM
Replies: 83
Views: 5465

Re: SCREEN1 = SYSVAR @ JSROM

Does the very same POKE, just hidden in a BASIC extension.

Tobias
by tofro
Fri Jul 12, 2019 7:22 am
Forum: Software & Programming
Topic: scanning the keyboard?
Replies: 4
Views: 421

Re: scanning the keyboard?

Oddly enough, I only get some keys back with io_fbyte (The window is a con), keys like backspace seem to emit 0xfff io_fbyte() should never return 0xff unless ALT is pressed together with another key combination. This looks more like you interpret an error code as character, maybe? #include <qdos_h...
by tofro
Thu Jul 11, 2019 11:42 pm
Forum: Software & Programming
Topic: scanning the keyboard?
Replies: 4
Views: 421

Re: scanning the keyboard?

Basically all of the keys on the QL's keyboard will produce a specific ASCII code, except <CTRL>-C and <CTRL>-F5 (these are intercepted by the system and cannot be caught by any means). The Shift, ALT and CAPS key will not produce a code on their own. (See the QL Manual here on "Character set a...
by tofro
Wed Jul 10, 2019 11:41 am
Forum: Software & Programming
Topic: Need help to understand some code, random number within a range of.
Replies: 9
Views: 527

Re: Need help to understand some code, random number within a range of.

Many thanks! I think I kind of get it, In the second example above, how does 10932, equate to a range of 5 numbers? 10932: Not at all. You want a number between 13 and 17. That is a range of 5. Thus, divide the complete range of random numbers RANDOM gives you by 5 to get the proper divisor: 65535/...
by tofro
Wed Jul 10, 2019 11:27 am
Forum: Software & Programming
Topic: Need help to understand some code, random number within a range of.
Replies: 9
Views: 527

Re: Need help to understand some code, random number within a range of.

pjw wrote:Am I missing something here? What about RND(50 TO 100)? or RND(-50 TO 50)? RND already does all the hard work for you..


Unfortunately for Pete he's not working with SuperBASIC, but with ACT (Adventure creation tool)

Tobias
by tofro
Wed Jul 10, 2019 10:26 am
Forum: Software & Programming
Topic: Need help to understand some code, random number within a range of.
Replies: 9
Views: 527

Re: Need help to understand some code, random number within a range of.

Peter, Let's say you want a number between 50 and 100: RANDOM gives you a number -32768-32767 scale that into -25..25 (you want a range of 50) DIVIDE 0,1311 (1311 is 32767/25, i.e the max/min value you want) gives you a value between -25 and +25 ADD 75 gives you a value between 50 and 100. Adaption ...
by tofro
Wed Jul 10, 2019 8:13 am
Forum: Software & Programming
Topic: SCREEN1 = SYSVAR @ JSROM
Replies: 83
Views: 5465

Re: SCREEN1 = SYSVAR @ JSROM

What might be a bit confusing is that SuperBASIC actually hides this fact in its pixel coordinate system - It still appears as if the QL had 512 pixels in x in mode 8 - SuperBASIC just halves the x coordinates before drawing, so if you want to mimic this behavior you should do as well.

Tobias
by tofro
Wed Jul 10, 2019 7:57 am
Forum: Software & Programming
Topic: Porting PLATOTERM to the QL as a QDOS app.
Replies: 9
Views: 706

Re: Porting PLATOTERM to the QL as a QDOS app.

How can I set up a seperate job for the serial i/o? I see mt_cjob()... -Thom That's what I use (It's assembler, but just use it, it was written By TT, the creator of QDOS. Ready to be compiled by C68-as). A data space of 500 bytes works well for me for most functions. Hand the independent job the e...