- Posts: 168
GUI
- MatCat
- Topic Author
- Offline
PhracturedBlue wrote: I can't fix it at the moment but just define:
in target/emu_devo8/stubs.cvoid SOUND_Init() {}
I don't see a stubs.c
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
You should have:
target/emu_devo8/stubs.c
I just committed the fix though. I also added timer support. If you want to know the time, you can use CLOCK_getms().
If you need to do something on a regular cadence, we can implement a callback system that does stuff on a regular interval, which would be more efficient than polling
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
I tried to create a pointer on the guiObject struct to guiBox inside of gui element struct however it doesn't seem to want to work right . But I am gonna figure it out.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
I think it would be a good starting point to define what's wrong with the original.
While I think it is not too bad, let me set out my complaints:
- It is not visible enough. That was the cause we started tinkering with the library;
- the voices and alarms are bad: the turn on/off voices are annoying and unnecessary, but the alarms (like the timer and telemetry warnings) are too quiet. Both shoul be configurable, like the buzzer setting is.
- values are slow to set by only small steps allowed. There should be larger steps too, or clicking inside the box it should be entered on a virtual keyboard, like they did with the fixed id and the name;
- model settings are dispersed into the model and function menu. You often have to go out entirely, go into the other menu, change something, go out again, beck to the previous menu, so you can change a thing which was disabled depending of the other setting.
There a a lot more in the "would-be-great" category, for example: shortcuts on the main window should be configurable, but the above ones are really annoying sometime...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
also, it is possible to completely remove tearing in the emulator by switching to an event loop. there is a define in makefile.inc to enable this. I decided to leave it off, as any tearing you see with the current implementation will show up on the actual hardware, only worse, so hiding it in the emulator masks the problem.
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
If you remember, you can press 'x' to exit cleanly though.
Edit: It is fixed now.
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
Windowed Redraw is partially working, and as I go along I will continue to refine it to work properly.
I am also going to put in a start screen (binding time) too.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Would you mind if I converted all of the guiDialog/guiButton/guiLabel structs into a single union? Overall I think it would use less space (though individually the struct will be a little bigger). but it should make the code a lot easier to read since most of the case statements in gui.c would go away. Alternatively, we could define all the structs to have common variables in a common location, then we could cast each to a base struct and still save most of the code complexity (though not the variable space)
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
* Only a dialog object can overlap another object
* When a dialog is open, anything underneath will not be redrawn
* If a dialog image has transparency, the transparency will not be properly honored
With those rules in place, it is much easier to do a partial redraw as there is no need to intersect objects to see if they overlap, and ordering of objects is irrelevant.
There are further efficiencies that can be implemented still, especially with regards to removing objects, but it seems to work pretty well now.
I introduced a new 'dirty' bit which can be set for each object, and then a redraw will only redraw the dirty objects.
I also introduced a new 'transparent' bit which defines whether a GUI object has transparency. If it doesn't, there is no need to redraw the background, and so there is less flicker.
Please Log in or Create an account to join the conversation.
- MatCat
- Topic Author
- Offline
- Posts: 168
On your post above about restructuring the objects, I am open to any more effecient method, I was considering a way to try to do it more class style like, but I don't see how inheritance or type casting would work very easily in straight C, I also did think about the idea of creating the object there in code where it is needed, instead of the API for GUI handling the data store, but that makes it more complex to keep track of things from the business end of the code... I am open to ideas. I have been busy for a few days, and probably will be for the next few days, hopefully I can put some time into some of the GUI code, but it may be a few days before I can put any real time in it.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
The performance is now sufficient for me to start work on the Mixer page, though if you can get similar performance without the overlap restriction, that would certainly be better.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
1) It limits the ability to modify the layout of the screens via a theme. We'll basically be hardcoding all of the elements. At most you could reorganize them in a theme, but not change their size
2) You can't store any dynamic data in the widget. That either needs to be stored in the object, in a linked pointer or fetched via a callback.
Still, I think this is the way to go. It should save a lot of RAM.
I've just added a spinner widget. I think I now have enough widgets to design the Mixer page.
I'm trying to decide if this is a good time to try switching to a ROM based implementation, or if I should build the mixer interface 1st.
I added code to significantly improve BMP performance, but we're currently limited by the FAT filessystem implementation as far as redraw speed. I'm not sure what we should do here. I could probably write some routines to short-circuit the FAT system when reading data, which may help, but I'm not sure I really want to go there.
Please Log in or Create an account to join the conversation.