Graphic modes

Página 4/20
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9

Por msd

Paragon (1461)

Imagen del msd

30-10-2005, 23:41

you don't use the HALT instruction for idle mode?

Por Prodatron

Paragon (1797)

Imagen del Prodatron

30-10-2005, 23:54

Processes can be in idle mode (they release the CPU time when there is nothing to do) or even in sleep mode (they are not executed until they receive a new message from someone else). But what do you mean with the HALT instruction? I think, it just would waste CPU time, as the CPU is doing nothing until the next interrupt appears.
In SymbOS the multitasking is based on priorities:
- first all processes of the highest priority will be executed.
- only if they all release the CPU time by themself (if a process is working too long, it will be interrupted by the OS, so it didn't release the CPU time by itself), the processes with the next priority will be executed
- the idle process has the lowest priority and will only be executed, if ALL processes released the CPU time by themself.

That means, that on a 50Hz switching base the idle process will work nearly 1/50second until the next process can be executed, if before all processes released the CPU time by themself.

I will test these two things:
1.) is there a problem with the reaction time of the tasks, if switching is at 50Hz?
2.) does 150Hz waste much CPU time compared to 50Hz because of the higher amount of task switches?
If 1 is false, it will be fine for MSX
If 2 is false, I can stay with 150Hz on the CPC, doesn't matter what the result of 1 is.

Cheers,
Prodatron

Por flyguille

Prophet (3028)

Imagen del flyguille

31-10-2005, 00:10

if wast or not too much depends on the quality of the code.

50hrz is just fine.... for switchs between threads but not for switchs between events... (I must suppose that you don't assign a task to every event able to be in the GUI (like assign a thread to each button or something)....

Por pitpan

Prophet (3145)

Imagen del pitpan

31-10-2005, 00:12

if wast or not too much depends on the quality of the code.

I really need help with this one, Fly. What the heck did you want to say here? Question

Por flyguille

Prophet (3028)

Imagen del flyguille

31-10-2005, 00:14

If you askme all the GUI tasks (like redraws or any event) is divided between the appls that owns GUI's objects... and is a task of the appls. to see if there is events waiting on the objects that owns.... and then to reply to the events of those using the appl. thread's time....

that is the more logical for every O.S. incl. windows and VB programming way.

greetings

Por flyguille

Prophet (3028)

Imagen del flyguille

31-10-2005, 00:16

if wast or not too much depends on the quality of the code.

I really need help with this one, Fly. What the heck did you want to say here? Question

sorry CORRECTION right now

if IT wast or not too much, THAT depends on the quality of the code.

Por pitpan

Prophet (3145)

Imagen del pitpan

31-10-2005, 00:27

I'm sorry, Fly. Still don't get it.

Anyway, there's suddenly a new OS frenzy race going on in the MSX scene! I like it!

Por Prodatron

Paragon (1797)

Imagen del Prodatron

31-10-2005, 00:36

Hi Flyguille,

sorry, I still didn't understand you exactly.
In SymbOS the GUI is controlled completely by the GUI process (called "desktop manager" ) . If the user clicks something (maybe a control inside a window) the desktop manager process sends a message to the process, which owns the clicked GUI object. The process will receive the message and can react. As an example it can redraw something. To do this, it sends a message back to the desktop manager, that it should do the redrawing (only the desktop manager can draw something).
That's it, hope I could explain it in a clear way.
Btw, MNBIOS looks very impressive and I liked to study the documents!

Cheers,
Prodatron / SymbiosiS

Por flyguille

Prophet (3028)

Imagen del flyguille

31-10-2005, 00:51

I understand perfectly how you did it... that is another way to do that.

but, the use of messages between tasks makes delays.... I thought other way for MNBIOS.

in MNBIOs is a event buffer on the instance of the objects... in others words... the GUI hasn't a thread by itself.... it not needs one... the GUI is just a main library where is possible to hung objects codes.

saving time....

and the kernel hasn't a GUI... just standarize the place for it and how to use it... that opens it like a puzzle....

but i must admin ... I am stuck in real life stuff and family stuff... Sad

Por Trebmint

Champion (294)

Imagen del Trebmint

31-10-2005, 01:19

Speed isn't that much of an issue in my opinion when it comes to message events, as they are fairly rare occurences in processing terms, so how they are handled isn't that much of an issue. And Symbos doesn't produce the variety of events that Windows can, as you'd probably expect. Not that I'm saying its slow, becuase it isn't

The messages though are invisible to the coder (unless they want them to be). When an event happens it jumps straight to the necessary code if it exists. The piece of code below is based on three objects/gadgets which are scroll bars holding a value between 0-15 each representing Red, Green and Blue (all created with the form editor). Any click or change of value in these bars will call the code, and effect the palette. Its pretty darn simple to use really.

;**** Code called on event occuring on RedScroll
Function RedScroll_Event
call CombineColorScrolls
ENDF
;**** Code called on event occuring on GreenScroll
Function GreenScroll_Event
call CombineColorScrolls
ENDF
;**** Code called on event occuring on BlueScroll
Function BlueScroll_Event
call CombineColorScrolls
ENDF
;****
Function CombineColorScrolls
ld a,(RedScroll_Value)
And %1111
ld l,a
ld a,(GreenScroll_Value)
rl a ;Multiply 2
rl a ;Multiply 4
rl a ;Multiply 8
r1 a ;Multiply 16
And %11110000
ld d,a
ld a,(BlueScroll_Value)
And %1111
Or d
ld d,a
ld e,0
call SyDesktop_ColSet
ENDF
;*************************

Obviously if you need to test for a specific event happening on a object you can test A

Function OkayButton1_Event
cp DSK_SUB_MMCLICK
jp Middle_Mouse
...
ect

Página 4/20
1 | 2 | 3 | | 5 | 6 | 7 | 8 | 9