Jump to content
IGNORED

New GUI for the Atari 8-bit


flashjazzcat

Recommended Posts

Probably something more basic would tend to stick better.

 

Modern Atari Graphical Interface. or MAGI

 

or

 

First Usable Atari Graphical Interface or FUAGI , pronounce like Fuji. ;)

 

(I'll get my hat.)

 

or stealing an idea

 

Graphical Atari Interface OS or GAIOS. ;)

 

Something along those lines.

Edited by AtariNerd
Link to comment
Share on other sites

Since this demo application is getting more complex, and it's the first and only application yet written for the GUI, here's a snippet of the main loop and some other bits:

 

mainloop
mwa #myevent EventRec
jsr get_event	; wait for event

mwa myevent[0].handle object ; set up object handle in advance for those functions which need it
 
lda myevent[0].what	; see what kind of event we have
cmp #GUIEventType.WM_SIZE
bne not_window_sized
jsr get_client_xywh ; get client position and size and store them
jsr CalcDocumentSize ; make any necessary changes to document size and scroll bars
jsr SetDocumentSize
jmp mainloop

not_window_sized
cmp #GUIEventType.WM_MOVE
bne not_window_moved
jmp mainloop ; nothing to do at the moment
 
not_window_moved
cmp #GUIEventType.WM_REDRAW
bne not_window_redraw
jsr get_client_xywh
jsr CalcDocumentSize ; we should cache these values to save time here
jsr render_client
jmp mainloop
 
not_window_redraw
cmp #GUIEventType.WM_HSLIDE
bne not_hscroll
jsr dohslide
jmp mainloop
 
not_hscroll
cmp #GUIEventType.WM_VSLIDE
bne not_vscroll
jsr dovslide
jmp mainloop
 
not_vscroll
jmp mainloop


dohslide
jsr get_client_xywh ; save client area position and size
mwa MyEvent[0].x CXOffs ; get x offset into document
jsr CalcDocumentSize
jsr CalcFirstFile
jsr ClearClientArea
jsr render_client
rts
;

dovslide
mwa MyEvent[0].y CYOffs

rts



.proc CalcDocumentSize ; work out size of document
mwa myclienth ptr1
mwa #10 ptr2
jsr divword ; get client height div 10
stax FilesPerColumn
stax ptr2
mwa #NUMFILES ptr1
jsr divword ; work out number of columns
stax NumColumns
stax ptr1
lda ptr4 ; check remainder
beq NoExtraColumn
inc NumColumns
inc ptr1
NoExtraColumn
mwa #ColumnWidth ptr2
jsr mulword ; work out pixel width of document
stax DocumentWidth

rts
.endp



.proc SetDocumentSize ; set the document and scrollbar thumb size
mwa myclienth Height
mwa DocumentWidth Width
lda #WindowProp.DOCUMENTSIZE
jsr winset
rts
.endp


.proc CalcFirstFile
mwa CXOffs ptr1
mwa #ColumnWidth ptr2
jsr divword ; get X Offset div Column Width
stax ptr1
asl ptr4 ; see if remainder * 2 is greater than column width
cmp #ColumnWidth
bcc NoExtraCol
inc ptr1 ; bump column number
NoExtraCol
mwa FilesPerColumn ptr2
jsr mulword
stax FirstFile
rts
.endp


.proc ClearClientArea
mwa myclientx cx
mwa myclienty cy
mwa myclientw width
mwa myclienth height
jmp clear_box_b
.endp


get_client_xywh
lda #WindowProp.CLIENT ; get dimensions and position of client area
jsr winget
mwa cx myclientx
mwa cy myclienty
mwa width myclientw
mwa height myclienth
rts
;


get_event_message_xywh
mwa myevent[0].x cx
mwa myevent[0].y cy
mwa myevent[0].width width
mwa myevent[0].height height
rts
;


 

All very rough but I thought it would give some idea of how main loops might look in MADS assembler. It will all be much more intuitive, I think, when PROC calls are used and all the application's code uses paramater passing. CalcDocumentSize is bundles of fun: after a window resize, it figures out how many filenames fit in a column, how many columns there are, and how big the virtual workspace needs to be based on this information. SetDocumentSize then passes these dimensions to the window manager, which scales the horizontal scroll bar to suit. These scroll bars are very tricky to get right, and I'll be making a lot of tweaks over the weekend. It's enormous fun seeing this stuff come together, though. I figure it'll be a real blast writing applications.

  • Like 2
Link to comment
Share on other sites

Some name ideas:

 

MAUI - promounced like the island in Hawaii, stands for Modern Atari User Interface

MAGUI - pronounced like gremlins before they become gremlins, Modern Atari Graphical User Interface. OK. Moving on.

8-Blit - 8 Bit, but an "l" added in to make it...yeah, you get it

FlashM8 - pronounced "flash mate", FlashJazzCat's Modern 8-Bit

  • Like 3
Link to comment
Share on other sites

No demo yet: coding is heavy and progress seems painfully slow. And yet it's progress.

 

Controls now have "states" and can be disabled and hidden from mousedown events. In accordance with the document size specified by the application, vertical and horizontal scroll bars now disable themselves if they're not required.

 

post-21964-0-82724200-1338296372_thumb.png

 

So, pretty much just icon view to do now, then we'll have a reasonable simulation of what the file browser might look and feel like.

  • Like 4
Link to comment
Share on other sites

Scrolling icon view at last:

 

post-21964-0-14739200-1338383256_thumb.png

 

Must take a break before fixing a few more bugs. I woke at 4am today, couldn't get back to sleep, so found myself working on this at five in the morning on the laptop. I've only had two hours' sleep and I'm wrecked so I think I'll take a short break before preparing an XEX. :)

 

BTW: icon view is very rough (labels aren't centred, padding is all off, etc), so this screengrab is hardly doing MrFish's artistry justice. Icon view is, however, nice and fast. :D

Edited by flashjazzcat
  • Like 3
Link to comment
Share on other sites

Maybe you've mentioned this before, but I'm not ready to go back through 67 pages...

About how large do you estimate the final product to be?

Can one "lasso" or otherwise graphically select groups of files for copying, etc?

Sure looks nice!

 

-Larry

Link to comment
Share on other sites

No blitting (of scrolling) yet, and still lots to do:

 

http://youtu.be/iHtllQhr4Rk

 

Beautiful and Classy.

 

That's all I can sincerely (and deservedly) say.

 

It is HARD to believe that a 1.7+Mhz 40-pin CPU sitting in a 25+ years machine, with an amount of ram that does not even match the buffer of network-card or my hard-drive, is actually capable of rendering this... That's what makes it so special.

 

This product will bridge future generations' curiosity and attention back to the root and source of an era that made it all happen, and it did so with a level of excitement and curiosity that may never return or be known to such generations.

 

Just keep trucking, and CHARGE ($) for your final product, so you will have the incentive to keep working on it, improve it and refine it, until our time comes to an end.

 

THANKS.

Link to comment
Share on other sites

Have a mouse question...

 

I tried searching just this topic, all 67 pages, for "ST mouse".

 

Couldn't find the information that I was seeking.

 

It's going to use any ST compatible mouse, correct?

 

In that case, shouldn't a PeST work with the 8bit and this GUI,

since the ports are so close? Just curious...because if it does

work, it would allow a little more latitude over mouse choices.

 

http://pest.atari.org/

Link to comment
Share on other sites

In that case, shouldn't a PeST work with the 8bit and this GUI,

since the ports are so close? Just curious...because if it does

work, it would allow a little more latitude over mouse choices.

 

http://pest.atari.org/

 

I don't see why it wouldn't work. One Atari user has already tested one of these, although I think he had to use an additional connector in order for it to make a solid connection (joystick extender, I believe). I plan on getting one of these or a similar device myself, although I don't mind the ST mice.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...