|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
Chris
|
GUI Programming
Posted: Mon Mar 06, 2000 11:44 pm
|
I know this seems like a very long, grueling and
technical thing to ask but how do you develop a GUI? I'm not looking for codes but more for an overview and what steps I need to do in order to get a GUI working. Is anyone out there willing to explain or are there some good documents out there that I can read? Chris :o) |
|
Nyef
|
Posted: Tue Mar 07, 2000 12:54 pm |
Could you perhaps be more specific? Are you developing for X, Win32, Win16, DOS/Allegro, Win32/DX, SVGAlib. BeOS, MacOS, DOS/DIY graphics, what? Each requires a different approach to creating a GUI (although not that different, as most of the concepts would be the same). Actually, one usually starts with an event loop of some sort. For X, Win32, Win16, MacOS, and BeOS this will be fairly well documented (for Win32 and Win16, check the official MS docu, for X, try the O'Reilly docu (or some of the PH stuff)). For the rest, you get to use someone else's kit or write your own. What fun! And what you do depends on the type of GUI you want to have.
--Nyef |
|
Chris
|
More Specific
Posted: Tue Mar 07, 2000 3:16 pm
|
I want to develop an entire GUI from scratch. No OS help from me. So this slices off X, Win16/32, BeOS, and MacOS. I want to develop under something that's plain like Win32DX Console App or a DOS app without Allegro or whatever else is out there.
That's what I'm looking for. What is the concept behind GUI's? How do they tick and continue to tick?
Well, call me crazy but I want to write my own. I'm one of those programmers who likes to be flexable at all aspects to computer programming. I don't wanna be turned down from a future job because I can't do this or that.
I don't know whether you want to call this simple or not but I want to start out with just a pop-up menu that's keyboard driven; similar to what LoopyNES and Fellow did. If I can get that working then I will re-design it and expand on what I did by figuring out how the mouse works, writing my own mouse routines, plugging them into the GUI, and then adding menus, dialog boxes, check boxes, etc. My reasons being that soon I want to go down to the assembly level and actually write my own little command-line Operating System. Why? So I can get hands on experience on how systems matience works, how drives work, how to control read/write heads, formatting and organizing sectors you created, copying and moving files, etc. If I can actually pull all of that off, I'll expand from that and actually create a GUI OS of some sort. Chris :o) |
|
Nyef
|
Re: More Specific
Posted: Tue Mar 07, 2000 3:45 pm
|
Masochist. ^_^
Once again, "it depends on what kind of GUI".
You're crazy. Welcome to the club (we're all crazy here).
So you want the user to be able to press escape and have some sort of meny appear? (I've never used LoopyNES or Fellow, so I don't know how their interface is laid out.) And then be able to navigate the menu with arrow keys and enter or something? Most of the fun stuff goes in the keyboard interface. You will probably want an event-driven interface rather than an array of key states (didja notice that MESS uses an array of key states that they scan periodically for keyboard emulation? That _has_ to be slow). Look at how, say, X and Win16/32 implement keyboard access, and use that as a basis for how your implementation should work (feel free to maintain an array of key states as well, such can be useful for emulating joypads via a keyboard). Then all you have to do are the graphics (left as an excersize for the reader) and laying out the menus in memory and navigating them (again, left as an excersize for the reader, but may I suggest pointers and structs?).
Ah, yes. The great goal of all too many programmers. Their own OS. I'll probably be looking at writing one myself in a while (I'm a bit busy right now trying to get my Apple ][ emulator working...).
--Nyef |
|
LSJMDM
|
Posted: Tue Mar 07, 2000 8:12 pm |
Hello :)
If you like to program a GUI, try to find one source code library such JAWS and try to change it to accomodate yours. For example, Calypso uses a heavily modified version of JAWS (I´m soure that Nesticle and Callus uses and old version of JAWS, modified by Sardu), wich is based on Allegro, but uses a small group of functions: mouse, blit, timing, etc... . First of all is to make and "isolation" archive, wich contains the functions wich are not transportable. Then, if you like to port to another operating system you only have some work. Allegro is easily to port, so a good option is to catch some GUI code from a libray available for Allegro. I thing is the best way. Saludos, JMD |
|
Chris
|
Clarification
Posted: Tue Mar 07, 2000 10:12 pm
|
I dunno whether that's a foreign word or I've never come across it. What does it mean?
Let's start with event-drived keyboard-based. Then when I understand that I'll expand.
It's a figure of speech. I'm not crazy at all. I'm simply a programmer. Crazy people go online and announce suicide. Crazy people hack into the Government just for the fuck of it. Crazy people cut off electrical power to an entire section of town cause someone called them a "Nerd". Crazy people sit online for hours at a time and boot people off line. Crazy people Mac with girls online, send them fake pics of themselves, invite them over to their house, and RAPE them. I dunno about you but I code to produce results, not to destroy other people's lives. Anyway, lemme get back on subject :o)
Exactly! Yes!
Well, I guess that's why they call it MESS. No consideration for the slow PCs out there. I understand what you mean by event driven.
Yeah. I finally understand that complicated beast called pointers and I'm well-rounded with structures.
For myself, my goal isn't to write the next Windows, Linux, or BeOS. I want to see if I could pull it off. Just the idea of sliding in a disk, cutting your computer on, and starting up your own command-line DOS. The day I do that is the day I drop a tear from my eye and blatenly say, "I AM THE JESUS OF COMPUTERS." *sniff* Chris :o) |
|
|
Free Provocation
Posted: Tue Mar 07, 2000 11:07 pm
|
[weird philosophical considerations]
May I ask, as you are asking questions on this board since about ten months now, what result did you get ? |
|
Eric
|
Re: Clarification
Posted: Wed Mar 08, 2000 1:30 am
|
In a very general sense, it means someone who takes pleasure in being in pain or suffering. Good luck with your OS. (I have some experience with protected-mode OS-independent assembly language if you have any questions. I've written my own very small protected-mode OS kernels is assembly language before.) Eric Quinn. |
|
Chris
|
Re: Free Provocation
Posted: Wed Mar 08, 2000 1:44 am
|
Sure. I've learned about the bitwise operators like AND, OR, and XOR. I've learned about malloc and allocating memory. I've learned about simulating registers. I've gained better knowledge on unions and structures. I've learned about pointers. There's too much stuff for me to remember. Within these 10 months, I've gained lots of concepts and different ways to do stuff. I'm suprised you haven't seen my improvement. 10 months ago I was asking "How do I Read Roms in C?" and now I'm asking stuff like "Bank Switching" and "Polling for Joysticks" (I can read the joystick buttons, it's the X and Y that I'm having trouble with). I know you hate it when I ramble at the mouth but it has to be said. I like to take my time. I don't just to rush into shit I don't understand. Unlike most people, I sent myself minor goals. My next goal is to finish my 6502 core (C/Assembly). I have the tools and the concepts, it's just a matter of getting everything organized and working on it. I'm also going to write a nifty little debugger along the way so I know if there's anything wrong with my core. Afterwards I want to learn Direct Draw and get a little GUI for my NSF player (Not a necessity but it would be nice to learn). Then I gotta experiment with Direct Sound and see if I can play and minipulate a square wave sound. If that works out well then I'll begin the actual NES emulation and try to play some NSFs. My list of goals is almost never ending. By the time I acomplish one I've added 4 or 5 more to it. Alright, I'm shutting up. Chris :o) |
|
Chris
|
Eric, you're a saint! :o)
Posted: Wed Mar 08, 2000 1:47 am
|
How do you know all of this stuff? How old are you? Did you attend college? Are you a teacher? Besides Nyef and Dan Boris, you've been the only one who's taken the time to really help me in my times of need. I'll never forget you.
Chris :o) |
|
Eric
|
Re: Eric, you're a saint! :o)
Posted: Wed Mar 08, 2000 5:41 am
|
I doubt very much I know as much as you think I know. I can't help you with GUI programming, but I can help you with some basic OS kernel stuff.
Over 21.
Yes.
No, but I had a temporary teaching job (as a teaching assistant to a professor) in college. I taught Introduction to Computer Engineering course for 3 semesters (ECE290 at University of Illinois Champaign/Urbana) Now, I'm officially a "Computer Engineer" in the computer business. I work for a well-known computer chip manufacturer. (I'm not telling which one though.)
It's been my pleasure.
Just remember that when you've struck it rich with some great new software program! :-) Good luck. Eric Quinn |
|
|
Re: Free Provocation
Posted: Wed Mar 08, 2000 2:25 pm
|
That's the exact point. Also, Knowning theory is truly useless if you don't know how to use it anyway, and if you already used it. [..]
And you call that minor goal ? With no disrespect, at your level you should better set a goal like making a tetris clone. Get three months and do a nice one, you'll be surprised how many things you will learn from it.
In my school having tools and concepts would get you a 0. "Getting everything organized and working on it", as you said, is the real work.
That's the problem :) |
|