|
While I thought there "should" be a problem having the 2 events, I've come to the conclusion it's not. In my case, the second event is just an extension of the first (select one versus many).
The "file click / double click" could just as easily be a select file (in single click) -> open selected file from single click (in double click).
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I don't see the strangeness. That's how it's usually implemented, in Widnows Forms it's just hidden. In VB6 there were controls that didn't expose DblClick events and it had to be manually managed through MouseDown and MouseUp. It also had to be done if managing modifier keys (as Ctrl, Shift...).
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I have no idea about UWP, but on other touch screen systems there is also "long tap", not to mention various forms of dragging and swiping...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I assume a long tap occurs when the interval between "finger down" and "finger up" is sufficiently long, and that velocity distinguishes dragging from swiping.
A UI with limited inputs that relies on timing to define additional events can be a problem. Long ago, I worked in a group that was developing a new business phone. It could have two calls on the go, which would be on "A" and "B" keys. To conference the calls, you'd push A and B down together. This was eventually abandoned in favor of an explicit CONF key because you'd simply press A or B to flip from one call to the other. Having to press simultaneously introduced timeouts, delays, and possible errors. The corporate group that approved UIs decided that this wasn't good.
But even with a better UI, one gentleman managed to conference his wife and mistress...
|
|
|
|
|
The stork brings them, but that's not the interesting part. I want to see 3D graphics on an 8 bit computer, at least once I get around to build the graphics card. It's going to have a TMS9981 graphics chip, a RISC graphics processor and a DMA based DGP (Decelerated Graphics Port).
Anyway, I'm going to need some math routines for, let's say, 32 bit fixed point math. Will 24 bits for the whole numbers will be enough, but maybe just 8 bits for the fractions are not. We shall see. Anyway, I intend to use the Russian Peasant Multiplication[^] algorithm. It's based on multiplying and dividing by 2 (also known as shifting) and addition. That should be easy to implement. But what is the algorithm for division called? I'm going to need that as well.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
|
Certainly does. At least I now have all bases covered. But before I write the first code, I'm going to check the runtime behavior of the algorithms to pick the best choice. No time to waste on an old 8 bit CPU.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
It is always going to be a slow(ish) operation in software, that is why they brought out co-processors and eventually implemented it on the CPU.
Just remember when you multiply/divide the decimal point will move and you will need to normalise the result.
You might also look into doing binary square roots:
Methods of computing square roots - Wikipedia[^]
I have never used this myself, but there is code there, so that should help you assess the speed of it.
|
|
|
|
|
and I'm struggling with keypad and 7-segment display on my Z80 I'm building.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
What's the problem?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Keypad works fine(24 key), display works fine (7-segment 4 address, 2 data).
On reset I set display buffer to: FFFF FF
I then go into my main loop looking for keyboard input and when Data Available bit from keypad goes low I process the input and if it's a 0-F I put in address buffer if it's > 16 it's a function key and I process it as such.
For some reason on reset the system thinks that the data available bit is low and so I end up with display of; 0FFF FF.
I've put the scope on the DA pin and on reset it does not go low so not sure exactly what's going on. Not sure where to go from here as far as debugging.
For now Ive got it set up just to accept keypad input and put key input into 1st buffer position and if any function key pressed put 4444 44 into display buffer which it does just fine.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
Put in a delay loop before entering the main loop and processing any inputs. It's just an idea, but your code may be faster than the I/O chip after a reset. Give it a little more time to get going.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Thanks I'll try that today, was working on honey-do list yesterday.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
Turns out I needed to RTFM a little better.
I am using a 8255 (PIO) to talk to the keypad and display and was trying to use Mode 1 on Port A without doing the appropriate handshacking. So I put it in straight input mode 0 and it works like a charm.
Thanks for your feedback.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
People who used the as IDE controller ran into similar problems. That's why I plan to skip all I/O devices and will try to access the registers of the IDE devices directly, as memory mapped I/O devices themselves.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I'm beginning to learn the same thing.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
That sounds like the video chip that was used in the TI-99/4A home computer.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Exactly. Oldschool graphics chips suitable for 8 bit computers are hard to get.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
Restoring Division, usually. There are other options, but they make more sense in hardware than in software.
By the way take a look at Quarter Square Multiplication, it costs a bunch of ROM but it's a lot faster than bit-by-bit multiplication. Usually I wouldn't recommend it, but for 3D stuff you may need the speed.
|
|
|
|
|
CodeWraith wrote: I want to see 3D graphics on an 8 bit computer A very long time ago, at a university not too far away...
When I was in college I did an independent study course as one of my electives. My project was to implement Binary Space Partitioning[^] as a method for doing 3D hidden-surface removal graphics. The computer was a Z-80 running CP/M, and the display was 256x256 with 8 colors per pixel. The code was written in PL/I-80[^] from Digital Research. The program was so large it was written as a bunch of overlays and took a couple of disk swaps (8" floppies) to render an image.
As far as I know I was the first implementor of the BSP algorithm after the original authors. Another claim to fame is that this was the same algorithm used in the 1st version of DOOM. This happened almost 40 years ago, in 1982-1983.
Software Zen: delete this;
|
|
|
|
|
Well, that is a new one...
I just opened a C# project after a week and the contents of some of the .cs files has somehow been replaced with MetadataAsSource contents. It looks like they are from a completely separate project too. Fnu, but backups FTW
|
|
|
|
|
My primary development laptop has decided to start tossing BSODs which is unacceptable. I'll accept that Microsoft might just crash if I get too happy with plugging stuff in and out, etc, but this in the middle of just typing. This laptop is a re-branded Clevo and has always had driver issues. The fact that Microsoft insists on wanting to install bad drivers is beside the point. So far the errors have been:
- MEMORY_MANAGEMENT
- system_thread_exception_not_handled
- faulty_hardware_corrupted_page (new one for me)
- critical_structure_corruption
Researching, almost all of the reference is to bad memory. So, over the weekend, I fired up memtest86 to soak test the RAM. A dozen passes, no RAM errors.
Question 1) Using RAM test tools, have you ever found a bad RAM? Replaced it and all was well?
So I just searched my records for how old this machine is, and I'm pushing almost 5 years (within a couple of months). Me thinks its time to start shopping.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Yes, many times, as a tech back in the day.
I've had bad RAM, brand new, out of the box, as recent as a a couple years ago.
|
|
|
|
|
Interesting. How did you detect it? Swap out modules or run something like memtest86?
This last crash at 7:13 this morning mentioned something about a chrome.sys driver. This crash happened when I launched chrome.
Quite oddly, google returns no info about this file.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Swap modules.
RAM testing tools really don't find intermittent faults. They're good for finding solid faults though, which are surprisingly rare in my experience.
|
|
|
|