English Amiga Board Amiga Lore

Go Back   English Amiga Board > Main > Retrogaming General Discussion

Thread Tools
Old 15 October 2007, 15:07   #1
Registered User
Join Date: Dec 2002
Location: England
Posts: 940
Workbench-Style GUI System for the Nintendo DS

I've been working on a GUI library for the Nintendo DS (called "Woopsi" - spot the pun), with the hope that other homebrew authors will use it instead of wasting their time writing half-baked GUIs of their own. As an Amiga guy, I decided to go for a Workbench feel to it, so it might be of interest to people here.

Anyhoo, I've attached a screenshot of where I've got to so far. Current features include multiple screen support, screen dragging, windows, gadgets, a text viewer, Blitz Basic-style SuperBitmaps, screen backgrounds, an event system, and more.

If you want to have a look at the latest demo, you can download it from the SourceForge project page here (download the demo package; the other package is the sourcecode):


The zip file has the usual ROMs for the SuperCard, Slot-1 carts and the nds.gba file. If necessary, patch the .nds file for your card.

If you don't have a card but want to have a look anyway, you can use the DeSmuME emulator:


Finally, if you're interested in learning more about the system, there's loads of info on my blog:

Attached Thumbnails
Click image for larger version

Name:	WoopsiBackdrop.png
Views:	495
Size:	36.8 KB
ID:	15000  
ant512 is offline  
AdSense AdSense  
Old 15 October 2007, 15:56   #2
Ya' like it Retr0?
Zetr0's Avatar
Join Date: Jul 2005
Location: United Kingdom
Age: 41
Posts: 9,671

Its looking good !

I see you have a prefs idea for implementation another idea might be to have a "data types" support library?

I am curious on how you solved the pixel duplication and over writing on horizontal window movements?

keep up the good work!
Zetr0 is offline  
Old 15 October 2007, 16:28   #3
Registered User
Join Date: Dec 2002
Location: England
Posts: 940
Datatypes is an interesting idea; the only problem with it is that Woopsi isn't an OS, it's a GUI library. The larger I make the library, the smaller the applications that use it will have to be (DS homebrew ROMs have a size limit of 4MB). I'm looking into Amiga bitmap font support, though. It might be that I write loads of functionality, but make it easy to strip out the bits people don't need, or just release several packages - light, normal, full-fat.

Regarding horizontal window movement, I didn't implement solid window moving. Well, I did, but only in the slow full-window redraw way, which is commented out in the code in favour of the XOR rectangle.

Solid window moving is a fairly easy problem to solve, though, so I might add it back in at some point. If a window is moved vertically by any number of pixels, the standard DMA copy routine will work. If we move up, we start at the first row of pixels in the window and copy them to the new location, then work down - any pixels overwritten have already been copied. If we move the window down, we start at the bottom row of pixels and copy them to the new location. Same idea - any overwritten pixels are already copied.

When moving just horizontally, we work out how far the window is moving. If it's moving more than the width of the window, we can just do a straight DMA copy, since we're not overwriting anything. If we move 10 pixels to the right (for example) and the window is 100 pixels wide, we know that we can copy the right-most 10 pixels to the new location without overwriting anything, so we do that. The next 10 pixels can be copied over the previous pixels we copied, so we do that. We continue to loop until all of the pixels have been copied - in this case, we need 10 iterations per row. Moving left is the same, except we start with the first 10 pixels.

You can see that larger movements are more efficient than smaller movements - moving the window in the above example by 1 pixel results in 100 iterations of the copy routine per row of pixels. However, since we're just copying memory and not having to completely recalculate the window, it should be many times faster than the code I've currently disabled.

An even better approach would be to buffer every window in RAM, then use a simple one-copy-per-row method of blitting the window to the screen. The major problem with this is that each window would then require much more RAM than they do at present (current RAM usage of each window is fairly negligible), and as RAM is also limited the trade-off for eyecandy isn't worth it.
ant512 is offline  
Old 06 February 2008, 21:16   #4
Retro Nuts

spannernick's Avatar
Join Date: Aug 2004
Location: London/UK
Age: 45
Posts: 1,034
Very good demo you have made..
spannernick is offline  
Old 21 April 2008, 20:13   #5
Registered User
Join Date: Dec 2002
Location: England
Posts: 940
6 months later and I'm still going.

Features now include checkboxes, radio buttons and groups, a context-sensitive right-mouse menu (activated with the shoulder buttons and the stylus), list boxes, scroll and slider bars, support for both DS screens (and a custom screen flipping gadget), animated buttons, double-clicks, proportional fonts, skinning...
Attached Thumbnails
Click image for larger version

Name:	screen-capture.png
Views:	243
Size:	35.0 KB
ID:	16400  
ant512 is offline  
Old 21 April 2008, 20:19   #6
Graham Humphrey
Graham Humphrey's Avatar
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 29
Posts: 10,672
That's looking very good.
Graham Humphrey is offline  
AdSense AdSense  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbench 3.1 Where is the System Info? clitosa New to Emulation or Amiga scene 5 15 November 2012 21:18
Anyway to revert back to old style menu system? Gordon project.ClassicWB 7 01 June 2011 20:40
[Found: Transplant] Asteroids style game with weapon upgrading system blabla2k Looking for a game name ? 12 21 March 2009 22:58
Kumiko GUI - Amiga Workbench 3.1 GUI for Windows milika Amiga scene 31 18 April 2007 19:16
HD install of the Workbench /system 3.1 Maverick357 support.WinUAE 6 13 August 2001 20:30

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 13:45.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Page generated in 0.14520 seconds with 12 queries