Go Back   maemo.org - Talk > Software > Applications
 
Register FAQ Community Calendar Today's Posts Search

Notices

Reply
 
Thread Tools
  #1  
Old 2009-09-15, 17:11
marnanel's Avatar
marnanel marnanel is offline
 
Join Date: Sep 2009
Location: Philadelphia
Posts: 26
Thanks!: 14
Thanked 45 Times in 15 Posts
Default BBC Micro



Ten minutes' hacking around brings the Beeb to the N900. It has some keyboard focus issues which need seeing to. Also, beebem uses f12 to bring up an emulator menu, and the N900 has no f12. But with a little work we could see Elite running on this thing.

(If this was ever a serious project, some serious thought would have to be given to copyright issues about the MOS, the DFS, and BASIC: you can't do anything without the MOS, you can't do much without BASIC, and life without the DFS is painful. But they are all still © Acorn, whoever that is these days.)
Reply With Quote
The Following 7 Users Say Thank You to marnanel For This Useful Post:
  #2  
Old 2009-09-15, 17:16
javispedro's Avatar
javispedro javispedro is offline
 
Join Date: Jan 2009
Location: Barcelona
Posts: 2,355
Thanks!: 2,145
Thanked 5,249 Times in 1,344 Posts
Default Re: BBC Micro

Quote:
Originally Posted by marnanel View Post
It has some keyboard focus issues which need seeing to.
I'm also having those (DOSBox), and for now I have not yet identified the reason (to be honest I've not put too much though into the issue yet). So if you can guess why it seems to affect some apps only please tell

Other than that, it's a cool app
Reply With Quote
The Following User Says Thank You to javispedro For This Useful Post:
  #3  
Old 2009-09-15, 17:18
marnanel's Avatar
marnanel marnanel is offline
 
Join Date: Sep 2009
Location: Philadelphia
Posts: 26
Thanks!: 14
Thanked 45 Times in 15 Posts
Default Re: BBC Micro

Quote:
Originally Posted by javispedro View Post
I'm also having those (DOSBox), and for now I have not yet identified the reason (to be honest I've not put too much though into the issue yet). So if you can guess why it seems to affect some apps only please tell

Other than that, it's a cool app
Thanks. Fixing window managers is rather an obsession of mine, so I'm certainly going to be looking at that after work tonight.
Reply With Quote
The Following User Says Thank You to marnanel For This Useful Post:
  #4  
Old 2009-09-15, 19:58
TA-t3 TA-t3 is offline
 
Join Date: Nov 2006
Posts: 3,841
Thanks!: 655
Thanked 1,079 Times in 626 Posts
Default Re: BBC Micro

Quote:
Originally Posted by marnanel View Post
[...] some serious thought would have to be given to copyright issues about the MOS, the DFS, and BASIC: you can't do anything without the MOS, you can't do much without BASIC, and life without the DFS is painful. But they are all still © Acorn, whoever that is these days.)
Well, we have an ARM CPU in our toys, and ARM used to mean "Acorn Risc Machine", so maybe we have an implicit license to use Acorn material

Just kidding (about the implicit license), but Acorn was behind not only the beloved Beeb but also the incredibly successful ARM CPU (almost 3 billion a year sold.. quite a lot more than Intel has managed so far).
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
Reply With Quote
  #5  
Old 2009-09-16, 12:47
marnanel's Avatar
marnanel marnanel is offline
 
Join Date: Sep 2009
Location: Philadelphia
Posts: 26
Thanks!: 14
Thanked 45 Times in 15 Posts
Default Re: BBC Micro

Quote:
Originally Posted by javispedro View Post
I'm also having those (DOSBox), and for now I have not yet identified the reason (to be honest I've not put too much though into the issue yet). So if you can guess why it seems to affect some apps only please tell

Other than that, it's a cool app
Thank you

The problem is that there's a bit in WM_HINTS which (in both apps) isn't set. You can see this using "xprop -id 0x...":

For Beebem:
WM_HINTS(WM_HINTS):
bitmap id # to use for icon: 0x300000d
bitmap id # of mask for icon: 0x300000b
whereas for, say, mediaplayer we'd get:
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
window id # of group leader: 0x2c00001
I believe this is a problem with libsdl, but I haven't dug down any further to find why it's not setting this bit.
Reply With Quote
The Following User Says Thank You to marnanel For This Useful Post:
  #6  
Old 2009-09-16, 13:38
deadmalc's Avatar
deadmalc deadmalc is offline
 
Join Date: Nov 2007
Location: Leeds UK
Posts: 415
Thanks!: 217
Thanked 182 Times in 103 Posts
Talking Re: BBC Micro

Whooa! Exile on the n900, that would be so cool!
__________________
Life on the edge....always waiting to fall
Reply With Quote
  #7  
Old 2009-09-16, 17:16
javispedro's Avatar
javispedro javispedro is offline
 
Join Date: Jan 2009
Location: Barcelona
Posts: 2,355
Thanks!: 2,145
Thanked 5,249 Times in 1,344 Posts
Default Re: BBC Micro

Quote:
Originally Posted by marnanel View Post
The problem is that there's a bit in WM_HINTS which (in both apps) isn't set. You can see this using "xprop -id 0x..."
No, thank you instead, you're completely right (and sorry for dirtying your thread, but at least now I know I should probably file a bug about this...). The problem seems to be the missing WM_HINTS bit, but, while on DOSBox that bit is not set:
Code:
...
WM_CLASS(STRING) = "dosbox", "dosbox"
WM_HINTS(WM_HINTS):
		bitmap id # to use for icon: 0xc0000d
		bitmap id # of mask for icon: 0xc0000b
It is definitely set on a simpler SDL testcase I made:
Code:
...
WM_CLASS(STRING) = "test-i386", "test-i386"
WM_HINTS(WM_HINTS):
		Client accepts input or input focus: True
I have this suspicion this may be related to the window icon, but this is a wild guess just by looking at the above.

Yay, confirming: adding SDL_WM_SetIcon call makes the test case lose the input focus.

Last edited by javispedro; 2009-09-16 at 17:37. Reason: confirming
Reply With Quote
The Following 2 Users Say Thank You to javispedro For This Useful Post:
  #8  
Old 2009-09-16, 17:40
marnanel's Avatar
marnanel marnanel is offline
 
Join Date: Sep 2009
Location: Philadelphia
Posts: 26
Thanks!: 14
Thanked 45 Times in 15 Posts
Default Re: BBC Micro

Quote:
Originally Posted by javispedro View Post
The problem seems to be the missing WM_HINTS bit, but, while on DOSBox that bit is not set:
DOSBox (and BeebEm) have neither InputHint nor WM_TAKE_FOCUS, and the ICCCM says explicitly that this means "the client never expects keyboard input".

One rather interesting point is that a very quick perusal of Metacity's sources seems to indicate that Metacity will give focus if WM_TAKE_FOCUS is present or InputHint is set. Matchbox2, however, appears to give focus if and only if InputHint is set (it only checks WM_TAKE_FOCUS in order to tell whether to send WM_TAKE_FOCUS when focussing a window).

According to the ICCCM, having WM_TAKE_FOCUS present but not InputHint means that a client "wants to prevent the window manager from setting the input focus to any of its windows", so Matchbox2 is technically correct here. It is possible, of course, that Metacity behaves that way because it solves some problem in a particular subset of clients, so perhaps it would be good to change Matchbox2's behaviour.

Either way, it wouldn't solve the current problem, since the SDL apps in question set neither WM_TAKE_FOCUS nor InputHint.
Reply With Quote
The Following 3 Users Say Thank You to marnanel For This Useful Post:
  #9  
Old 2009-09-16, 17:41
marnanel's Avatar
marnanel marnanel is offline
 
Join Date: Sep 2009
Location: Philadelphia
Posts: 26
Thanks!: 14
Thanked 45 Times in 15 Posts
Default Re: BBC Micro

Quote:
Originally Posted by javispedro View Post
Yay, confirming: adding SDL_WM_SetIcon call makes the test case lose the input focus.
Woot, good catch!
Reply With Quote
  #10  
Old 2009-09-16, 17:55
javispedro's Avatar
javispedro javispedro is offline
 
Join Date: Jan 2009
Location: Barcelona
Posts: 2,355
Thanks!: 2,145
Thanked 5,249 Times in 1,344 Posts
Default Re: BBC Micro

I believe this is "our man":
SDL_x11wm.c, line 232

As a workaround, ifdef'ing the SDL_WM_SetIcon call out will work, since Maemo gets the icons from other sources either way.

If you believe Matchbox is right here, then this is a SDL bug :S

Last edited by javispedro; 2009-09-16 at 17:58. Reason: fixed link
Reply With Quote
The Following User Says Thank You to javispedro For This Useful Post:
Reply

Tags
bbc micro, bugs, n900, sdl


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. The time now is 21:34.