Commit Graph

24865 Commits

Author SHA1 Message Date
Michael Lotz
717b5b78ce Retry reading the capacity up to three times. The first try might only yield a
unit attention telling us that the device or media status changed, which is
expected.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 15:02:35 +00:00
Michael Lotz
57e81ac7d8 Properly initialize the device_hooks in the null and console drivers to include
the select/deselect/readv/writev hooks. Not that it would matter as the static
memory there is cleared to 0 anyway.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 13:37:08 +00:00
Michael Lotz
a47ceb2aec * Only set the select hook on the device module if we actually got a select
hook from the legacy driver.
* Add note explaining why it is set to an arbitrary invalid value (~0) and why
  it still works by redirecting in the virtual Select() of LegacyDevice.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 13:30:56 +00:00
David McPaul
d1b297a928 Implement FindKeyFrame
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 06:38:56 +00:00
David McPaul
bd9b4bd9d1 Implement FindKeyFrame
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 06:38:35 +00:00
David McPaul
1a1204316a Implement FindKeyFrame
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 06:38:04 +00:00
Michael Lotz
61ed28ee13 * All drawing modes except for B_OP_COPY should respect transparent pixels in
source bitmaps. The destination is preserved now when encountering such
  transparent pixels in the source bitmaps.
* B_OP_ERASE is supposed to replace with the low color whereever a source
  bitmap has a non-transparent pixel.
* The B_OP_MIN and B_OP_MAX drawing modes are supposed to select either the
  source or destination pixel based on their brightness, not combine the two
  pixels' color components into a new pixel. The brightness_for() function is
  taken from ColorConversion.cpp in the interface kit. Probably a simpler
  algorithm would do as well.
* Handle B_TRANSPARENT_MAGIC_* in all cases when drawing bitmaps with non-alpha
  source bitmaps, as all modes except B_OP_COPY are sensitive to transparency.

This should make all drawing modes behave as documented in the BeBook. Except
for B_OP_SELECT, which seems broken under R5, the results compare nicely now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 02:34:15 +00:00
Michael Lotz
3d75dfbb4a Adding a DrawingModes test application that uses the different drawing modes
to draw a bitmap and a B_MIXED_COLORS pattern. This shows that most of the
Haiku drawing modes are off of what the BeBook documents them to be and also
shows that B_OP_SELECT is actually broken under R5.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 02:18:16 +00:00
François Revol
35471ac53e - add fpu states
- add needed asm_offsets
- start of exception handling


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 01:36:52 +00:00
François Revol
feeb7a7124 On m68k immediate values are prefixed by #, not $, so we must filter it out too...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 01:12:44 +00:00
Michael Lotz
00c81869c5 Fix obviously swapped if statement checking for a solid pattern.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 23:51:37 +00:00
François Revol
ffa2f65116 Let's use asm offset instead of hardcoded values...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 23:41:36 +00:00
François Revol
b409283372 Set max cpu count to 1 for ARM. Anyone knows a real SMP platform using it ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 21:48:18 +00:00
Ingo Weinhold
0b4dac74e0 * Added kernel tracing for insertion and removal of cache pages (tracing
level 2).
* merge_cache_with_only_consumer() marked the source cache unbusy when
  it was done, which caused a race condition with the page fault code.
  I accidentally introduced this problem in r25716. Fixes #2326.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 21:08:07 +00:00
Michael Lotz
efec339946 Take the source alpha into account when doing a B_OP_INVERT so that drawing
bitmaps in B_OP_INVERT mode does not affect pixels where the source bitmap
was transparent, as noted in the BeBook. Not really sure I'm doing that right
though and probably needs looking into for B_OP_ERASE and B_OP_SELECT too.
Fixes bug #2421 though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 19:38:56 +00:00
Stephan Aßmus
50450a0053 Implemented an AudioReader subclass "AudioVolumeConverter" which applies
a volume to the audio data. It ramps between a previous and the current volume
if necessary to smooth out the changes. The volume slider functionality is
thereby restored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 18:15:48 +00:00
Michael Lotz
bdc47b1f97 Remove transparent magic handling for B_CMAP8, ImportBits() takes care of that already.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 14:48:06 +00:00
Stephan Aßmus
e11f3e83a0 For the time being, I uploaded a modified OSS package which does not
include the OSS media add-on (node), since Haiku comes with it's own
version. Therefor you can now add the OpenSound optional package and
it will just work out of the box, unless you have native drivers that
fight over the hardware with OSS. It is no longer necessary to delete
the opensound.media_addon from the home/config/add-ons/media folder.
If you don't build from scratch, make sure you delete
generated/download/OpenSound.zip or the change won't take effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 13:48:08 +00:00
Michael Lotz
f24652cba6 Fix two wrong debug output messages and add one for AS_SYNC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26063 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 13:45:58 +00:00
Stephan Aßmus
4e913061bb Make the buffer latency less agressive for Haiku, this makes audio playback
perfect in Haiku for me (HD Audio), while it adds a very noticable latency.
On C-Media, the difference between "policy 4" and "policy 5" is 2048 versus
32768 bytes, which is 16 times the latency. I added a note on why the same
policy on Haiku might give me troubles (C-Media versus HD Audio means
16 bits/sample versus 32 bits/sample) and if OSS does not double the buffer
size then I can see where the trouble is comming from. I should probably
figure out a more fine grained way of influencing the driver buffer size.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 13:13:21 +00:00
François Revol
2e314c0993 Fix build for Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:49:56 +00:00
Stephan Aßmus
773ead235b Added note about the remaining playback problem for using OSS in BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:19:55 +00:00
Stephan Aßmus
d3ebd7843a Victory! With these changes, playback is nearly perfect under BeOS (tested with
C-Media based sound card). In Haiku, I could test with HD Audio, and playback
has clicks. It doesn't seem to have to do with the "drift", which is now
correctly published, I am not sure what exactly is causing it, I would like to
test on different hardware yet.
* I have modified the buffering policy (4 will give about 2048 bytes internal
  OSS buffer), which decreases the latency of the node to an acceptable value.
* I completely replaced the timesource publishing algo to be more reliable.
* Removed now unnecessary methods from OpenSoundDeviceEngine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:14:26 +00:00
François Revol
1f5afb2e36 Add to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 12:12:17 +00:00
Stephan Aßmus
188ba2f72a * SetTarget((BView*)NULL) needs to unset the previous target's pointer to
the scrollbar.
* Added notes about BeOS behavior to SetTarget(const char*).
* Reuse SetTarget(NULL) in the destructor.
* Initialize fTarget and fTargetName in the archive constructor.
* Added TODO about possibly restoring the target in the archive constructor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 08:39:14 +00:00
François Revol
2760094c5c Add pc_floppy to the image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 00:53:51 +00:00
François Revol
1e4285015c Better handle incorrect io ranges, it should only be fixed for PC (around 0x3f0).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 00:35:07 +00:00
Salvatore Benedetto
f43368dcbd * Forgot to put us keymap as the default one
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 23:29:56 +00:00
François Revol
71c84a02ee Rename floppy target to pc_floppy, add to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 23:14:18 +00:00
François Revol
476618a00e Move the floppy driver to disk/floppy/pc_floppy, it will be named pc_floppy, as it handles PC-style controllers, but not only PCs have those, so it doesn't belong to arch anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 23:05:19 +00:00
François Revol
01cf5d4907 Prepare for move.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 23:01:16 +00:00
François Revol
8942de6c0d Make the floppy driver buildable again... even under Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 22:58:15 +00:00
Salvatore Benedetto
e65b3b4eac * Let's keep the alphabetical order
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 22:45:33 +00:00
Salvatore Benedetto
242b8e12a3 * Added italian keymap
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 22:40:15 +00:00
Alexandre Deckner
1c4b7e9e01 - revert my last changes to ScrollBy, this temporarily bring back #2312
and the previously mentioned ResizeToFit issue.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 20:04:10 +00:00
Ingo Weinhold
2fd41f637c Also scroll to the cursor when pasting something.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 12:38:52 +00:00
Ingo Weinhold
644470be68 Use the preferred history size. It's not settable via GUI yet, but one
can edit the settings file. The default are 10000 lines BTW.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 12:35:42 +00:00
Ingo Weinhold
a5e61a10eb Fixed mouse copy'n'paste support. We use a separate clipboard for mouse
selection which we update whenever the first mouse button is released.
This also enables copy'n'paste between Terminals.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 12:22:52 +00:00
Alexandre Deckner
d511a89a8a - Since r21336, BView::ScrollBy was checking the values against the ScrollBar ranges but ScrollBy is often called before
updating the scroll range (ie: in ContainerWindow.cpp). IMO, the programatic ScrollBy method shouldn't depend on the 
ScrollBars ranges or state. The original fix in r21336 was apparently hiding other BScrollBar or BView bugs that have been 
fixed in the mean time.
  The content was offseted when going back to list mode after moving icons on the left/up in icon mode. This fixes Tracker bug 
#2312.

- Revert and fix changes to ContainerWindow.cpp in r18481 (cvs 1.37). The condition was broken, but it wouldn't ScrollBy() 
anyway due to the previous problem. Fixing BView made the content autoscroll even if the lefttop corner of the extent was 
already visible.

- Probably unrelated, fix changes to ContainerWindow.cpp in r18993 (cvs 1.38). PoseView()->Bounds().left/top < 0 is expected, 
if for example in icon mode you move an icon close or crossing the left side of the window and then scroll left to adjust. 
This fix ResizeToFit that wouldn't scroll the view correctly in some cases.

So we had a Tracker Bug uncovering a BView fix that was hiding another Tracker bug, everything is fixed hopefully, phew :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 02:39:33 +00:00
François Revol
04390361b5 - comment
- fix building arch_debug. Misses many regs still.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 02:22:26 +00:00
François Revol
a3dc7ef06c - some cpu and platform fixes.
- we'll just use decimal chip number (68030, ...) to identify cpu, fpu, and mmu for simplicity.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 02:11:45 +00:00
François Revol
7d5d19dfab bviously M68KPlatform makes more sense here :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:40:58 +00:00
Ingo Weinhold
5ef3587ee7 Enable word navigation in readline based programs (bash most notably).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:34:33 +00:00
Ingo Weinhold
769b9b3c40 * Generate the same escape sequence when pressing control or command and
the left/right cursor keys.
* Normalized the Ctrl-<cursor> escape sequences. Makes word navigation
  in vim work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:33:18 +00:00
François Revol
194846c6a4 Remove another OF leftover. If we ever support hades or milan we'll add something else there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:24:27 +00:00
François Revol
616c19c359 Remove leftover OF header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26036 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:23:20 +00:00
François Revol
22531ab80f Fix building the pci bus manager. Still quite stubbed out though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 01:20:29 +00:00
Ingo Weinhold
10a01828a1 The main thread was used as BApplication thread and a new thread as
worker thread. That sounds somehow reasonable, but has the problem that
signals to the process hit a thread that doesn't know how to handle
them. Fortunately the author already prepared the code to switch the
thread tasks. In the Terminal vim does now correctly react on window
resizes. Probably also fixes #2393.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26034 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 00:56:05 +00:00
Ingo Weinhold
b43255b9f7 Squashed TODO: When writing a character in the last column of a line we
wrapped to the next line and a subsequent LF would advance another line.
We behave like xterm now, i.e. visually the cursor stays on the same
line (on the last character), but the next character will be wrapped to
the next line.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-20 00:30:13 +00:00
Ingo Weinhold
f9428b3ecd Also clear the selection when invalidating all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-19 22:23:59 +00:00