Commit 54e89e2f authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for handling of device driver buffer creation call

PRM 2-612 says the device driver can modify R3-R6 during buffer creation in order to change the buffer creation parameters used with BufferManager.
However, the subsequent logic in DeviceFS meant that if the buffer already existed the flags (R3) never got used.
In practice this only affects the magic buffer numbers 0-9 retained for BBC Micro compatibility (Keyboard/Serial in/Serial out/Printer/Sound 0-3/Speech/Mouse), and of those only Serial & Parallel are in DeviceFS, and of those Parallel had a workaround, so really only the SerialDeviceDriver gains a fix here.

Tested in an IOMD ROM.

Version 0.72. Tagged as 'DeviceFS-0_72'
parent ad3d0e44
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.71"
Module_Version SETA 71
Module_MajorVersion SETS "0.72"
Module_Version SETA 72
Module_MinorVersion SETS ""
Module_Date SETS "15 Jun 2013"
Module_ApplicationDate SETS "15-Jun-13"
Module_Date SETS "06 Jun 2015"
Module_ApplicationDate SETS "06-Jun-15"
Module_ComponentName SETS "DeviceFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/HWSupport/DeviceFS"
Module_FullVersion SETS "0.71"
Module_HelpVersion SETS "0.71 (15 Jun 2013)"
Module_FullVersion SETS "0.72"
Module_HelpVersion SETS "0.72 (06 Jun 2015)"
END
/* (0.71)
/* (0.72)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.71
#define Module_MajorVersion_CMHG 0.72
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Jun 2013
#define Module_Date_CMHG 06 Jun 2015
#define Module_MajorVersion "0.71"
#define Module_Version 71
#define Module_MajorVersion "0.72"
#define Module_Version 72
#define Module_MinorVersion ""
#define Module_Date "15 Jun 2013"
#define Module_Date "06 Jun 2015"
#define Module_ApplicationDate "15-Jun-13"
#define Module_ApplicationDate "06-Jun-15"
#define Module_ComponentName "DeviceFS"
#define Module_ComponentPath "castle/RiscOS/Sources/HWSupport/DeviceFS"
#define Module_FullVersion "0.71"
#define Module_HelpVersion "0.71 (15 Jun 2013)"
#define Module_LibraryVersionInfo "0:71"
#define Module_FullVersion "0.72"
#define Module_HelpVersion "0.72 (06 Jun 2015)"
#define Module_LibraryVersionInfo "0:72"
......@@ -607,7 +607,7 @@ make_buffer ROUT
[ FastBufferMan
05
SWI XBuffer_InternalInfo ; want buffer managers private buffer id
SWI XBuffer_InternalInfo ; want buffer manager's private buffer id
STRVC r0, [fr, #file_BufferPrivId] ; store private buffer id
STRVC r1, BuffManService ; keep service routine addr up to date
STRVC r2, BuffManWkSpace ; keep buffer manager workspace ptr up to date
......@@ -640,11 +640,17 @@ make_buffer ROUT
STR pc, [fr, #file_MadeBuffer] ; <>0 if buffer was made
10
]
Debug open, "handle of the first buffer", r0
STR r0, [fr, #file_BufferHandle]
Debug open, "setting modified flags for buffer", r3
MOV r2, #0 ; AND mask
MOV r1, r3 ; EOR bits (=set)
SWI XBuffer_ModifyFlags
Pull "r3, pc", VS
LDR r1, [fr, #file_Flags]
[ wakeup_data_present
TST r1, #ff_FileForTX
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment