mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
[PATCH 1/9] Plenty of blather. Got some good ideas.
NOTE: auto-magically re-imported by HAL 9000
HASH: e9561251df
(original)
This commit is contained in:

committed by
Wengier

parent
7befa1bf24
commit
156c55352c
@@ -1,9 +1,6 @@
|
||||
Some plans for future DOSBox-X developments
|
||||
===========================================
|
||||
|
||||
* Clock domains
|
||||
|
||||
- Current DOSBox-X emulation is CPU-centric, which is OK, I guess,
|
||||
- Current DOSBox emulation is CPU-centric, which is OK, I guess,
|
||||
but not ideal for much of the emulation.
|
||||
- Many delays and timing are based on floating point values in milliseconds.
|
||||
If clock domains were implemented, devices could count very accurately
|
||||
@@ -56,8 +53,8 @@ Some plans for future DOSBox-X developments
|
||||
|
||||
* Support for loading BIOS images and mapping them into adapter ROM
|
||||
|
||||
- We could test various VGA BIOSes in DOSBox-X that way
|
||||
- We could also run old motherboard BIOSes in DOSBox-X that way
|
||||
- We could test various VGA BIOSes in DOSBox that way
|
||||
- We could also run old motherboard BIOSes in DOSBox that way
|
||||
|
||||
* Convert I/O and memory handler callback system to on-demand bus mapping and
|
||||
tracing design
|
||||
@@ -92,7 +89,7 @@ Some plans for future DOSBox-X developments
|
||||
changes, the emulator has to invalidate all I/O and memory callbacks
|
||||
to allow the "slow" path to do it's work again.
|
||||
- The reason we don't do bus lookup every time is one of performance.
|
||||
DOSBox-X already has an array of IO handlers and memory page handlers,
|
||||
DOSBox already has an array of IO handlers and memory page handlers,
|
||||
so why not make use of it as a cache for callbacks once the slow path
|
||||
has been taken? Doing it this way should have almost no impact on
|
||||
emulator performance.
|
||||
@@ -121,33 +118,14 @@ Some plans for future DOSBox-X developments
|
||||
- IDE/ATAPI emulation needs to support the mode select or whatever commands
|
||||
used by DOS programs to change CD audio volume.
|
||||
|
||||
* Full Intellimouse scrollwheel emulation
|
||||
|
||||
- Apparently it's possible to respond to scrollwheel events via SDL, so
|
||||
add code to receive them.
|
||||
- Add code to store scroll wheel deltas in mouse event queue.
|
||||
- Add code to take overall scrollwheel delta and transmit as 4th byte
|
||||
in Intellimouse mouse on AUX.
|
||||
- And toughest of them all: Figure out how the hell Windows 98 is able
|
||||
to use scrollwheel data when it is still reliant on the INT 15h
|
||||
device callback that's documented only to carry the X, Y, and button
|
||||
state data. If VirtualBox can do it, so can I! The ONLY documentation
|
||||
I have on this are snippets of code from CuteMouse that is apparently
|
||||
able to turn on PS/2 BIOS scroll wheel capture for DOS. In any case
|
||||
perhaps the best course of action is to write a program in DOSLIB that
|
||||
hooks the device callback and records the values on the stack during
|
||||
the call, with and without the Intellimouse knock sequence in effect.
|
||||
|
||||
* Multiple DOS kernel emulation
|
||||
|
||||
- Instead of only emulating a general mishmash of MS-DOS 5.0 to 6.x syscalls,
|
||||
allow dosbox-x.conf setting (and command line at runtime) to choose that
|
||||
- Instead of only emulating a general mishmash of MS-DOS 5.0 to 6.22 syscalls,
|
||||
allow dosbox.conf setting (and command line at runtime) to choose that
|
||||
a particular brand and version is emulated. For example, if you say that
|
||||
you want DOSBox-X to emulate MS-DOS 3.3, then it will return values and act
|
||||
you want DOSBox to emulate MS-DOS 3.3, then it will return values and act
|
||||
like MS-DOS 3.3 (including the shorter form of the disk parameter table
|
||||
prior to MS-DOS 4.0). With the current code, if you say that you want
|
||||
DOSBox-X to emulate MS-DOS 7.1, then it tries to return values and act
|
||||
like MS-DOS 7.1 (including support for FAT32 drives and long filenames).
|
||||
prior to MS-DOS 4.0.
|
||||
|
||||
* Misc
|
||||
|
||||
@@ -191,38 +169,4 @@ Some plans for future DOSBox-X developments
|
||||
- IDE/ATA emulation: What exactly is triggering the debugger when
|
||||
you boot MS-DOS 6.22 using the OAK CD-ROM driver? It needs to be removed,
|
||||
it makes using MS-DOS 6.22 with debugger builds annoying.
|
||||
- VGA Linewise rendering is currently hardcoded for 16bpp RGB. Why?
|
||||
Add option to allow the user to choose 32bpp RGBA linewise rendering.
|
||||
- VGA output: add optional scalar or post-processing that can auto-detect
|
||||
fake high-color VGA modes in demos, and process the scanlines such that
|
||||
the RGB spreads vertically to mask the raster scanline effect (so that
|
||||
the picture is presentable even if rescaled later)
|
||||
- VGA output: Add support for VESA 24bpp modes (DOSBox's scalers are
|
||||
currently hard-coded for 8/16/32bpp). There are some demos (a 1997
|
||||
Coma demo comes to mind) where if a 24/32bpp mode is chosen the demo
|
||||
assumes 24bpp RGB arrangement.
|
||||
- VGA debugging function: Add code that, if triggered, allows DOSBox to
|
||||
pause emulation and allow you to examine/play with the VGA palette, DAC,
|
||||
registers, screen bytes, etc. The reason I want to do this is that there
|
||||
are some demos (listed elsewhere in the BUGS section) where for whatever
|
||||
reason there are VGA palette errors, some entries remain black despite
|
||||
palette animation. The "debugger" would overlay the VGA screen, of course.
|
||||
- VGA "fixed output" mode. A scalar would be invoked if enabled that
|
||||
upscales all VGA raster output to a specific resolution and frame rate
|
||||
(the frame rate would be 250Hz, 300Hz, or 1000Hz so that refresh rate
|
||||
changes are better represented accurately). This would be one way to
|
||||
capture demos that change VGA modes once per section in one AVI file.
|
||||
Scalar would include common VGA resolutions like 640x400, 640x480,
|
||||
800x600, and 1024x768. The scalar could also distort the picture if
|
||||
the CRT timing is known to cause older VGA monitors to squeeze the
|
||||
picture (such as some older DOS demos that speed up vertical retrace
|
||||
knowing it would cause older VGA monitors to focus the raster beam
|
||||
in the center for a "widescreen" effect).
|
||||
- VGA overscan border rendering. Update/rewrite the raster linewise
|
||||
renderers to include overscan border in output if asked to.
|
||||
- ODML AVI capture. The current code works great until you hit 2GB, then
|
||||
falls apart. I would be willing to throw in code I've written for other
|
||||
professional projects to write AVI files that are ODML compliant to
|
||||
enable longer captures >= 2GB (contain both the AVIOLDINDEX and ODML
|
||||
AVI index).
|
||||
|
||||
|
@@ -1,264 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
DOCUMENT:
|
||||
|
||||
PROGRAMMING DIFFERENCES BETWEEN SOUND MASTER II AND SOUND BLASTER
|
||||
FOR RECORDING AND PLAYBACK OF VOICE (DMA AND NON-DMA MODES)
|
||||
Version 1.0
|
||||
April 2, 1991
|
||||
|
||||
Programming and Documentation by Ryan Hanlon
|
||||
Copyright (c) 1991, Covox, Inc. All Rights Reserved
|
||||
|
||||
----------------------------------------------------------------------
|
||||
QUICK COMPARISON
|
||||
|
||||
---------------------------------------------------------
|
||||
SOUND MASTER II SOUND BLASTER
|
||||
---------------------------------------------------------
|
||||
BASE PORTS 0x0220, 0x0240, 0x0210, 0x0220, 0x0230
|
||||
0x0280, 0x02C0 0x0240, 0x0250, 0x0260
|
||||
---------------------------------------------------------
|
||||
BASE PORT 8254 TIMER 0 = 0x08 RESET = 0x06
|
||||
OFFSET 8254 TIMER 1 = 0x09 READ DATA = 0x0A
|
||||
8254 TIMER 2 = 0x0A WRITE COMMAND/DATA = 0x0C
|
||||
8254 CONTROL = 0x0B WRITE BUFFER STATUS = 0x0C
|
||||
CLEAR IRQ = 0x0C DATA AVAILABLE STATUS = 0x0E
|
||||
DISABLE VMDMA = 0x0D
|
||||
ENABLE VMDMA = 0x0E
|
||||
DAC OFFSET = 0x0F
|
||||
---------------------------------------------------------
|
||||
MAXIMUM INPUT (ADC) 25KHz INPUT (ADC) 13KHz
|
||||
I/O RATES OUTPUT (DAC) 100KHz OUTPUT (DAC) 13KHz
|
||||
(8 bit only)
|
||||
---------------------------------------------------------
|
||||
DATA 2 bit, 3 bit, 4 bit 2 bit, 3 bit, 4 bit
|
||||
true ADPCM (high quality) differential PCM (not ADPCM)
|
||||
COMPRESSION optional silence encoding optional silence encoding
|
||||
---------------------------------------------------------
|
||||
AVAILABLE 3, 4, 5, 6, 7 2, 3, 5, 7
|
||||
IRQ'S
|
||||
---------------------------------------------------------
|
||||
COMMANDS N/A 8 BIT DAC OUTPUT = 0x10
|
||||
8 BIT ADC INPUT = 0x20
|
||||
8 BIT DMA INPUT = 0x24
|
||||
8 BIT DMA OUTPUT = 0x14
|
||||
2 BIT DMA OUTPUT = 0x16
|
||||
2 BIT DMA REFERENCE = 0x17
|
||||
2.6 BIT DMA OUTPUT = 0x76
|
||||
2.6 BIT DMA REF. = 0x77
|
||||
4 BIT DMA OUTPUT = 0x74
|
||||
4 BIT DMA REFERENCE = 0x75
|
||||
HALT DMA = 0xD0
|
||||
CONTINUE DMA = 0xD4
|
||||
SET TIME CONSTANT = 0x40
|
||||
MULTI-CHANNEL DAC = 0x6?
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TURN ON SPEAKER = 0xD1
|
||||
TURN OFF SPEAKER = 0xD3
|
||||
CARD IDENTIFICATION = 0xE0
|
||||
GET DSP VERSION NUM = 0xE1
|
||||
----------------------------------------------------------------------
|
||||
NON-DMA INPUT OF 8 BIT PCM SOUND DATA
|
||||
|
||||
SOUND MASTER II SOUND BLASTER
|
||||
--------------------------- --------------------------------
|
||||
INITIALIZE SM II FOR INPUT INITIALIZE THE DSP FOR INPUT OF PCM DATA
|
||||
1. Set up timing method. 1. Reset the DSP chip by writing a '1'
|
||||
to the RESET PORT (offset 0x06).
|
||||
2. Wait 3 micro-seconds.
|
||||
3. Write a '0' to the RESET PORT.
|
||||
4. Insure that the DSP was initialized
|
||||
by polling for '0xAA' at the READ
|
||||
DATA PORT (offset 0x0A)
|
||||
5. Wait for the MSB of the WRITE DATA
|
||||
COMMAND PORT (offset 0x0C) to equal
|
||||
0.
|
||||
6. Write 0xD3 command (TURN OFF SPEAKER)
|
||||
to the WRITE DATA/COMMAND PORT.
|
||||
7. Set up timing method.
|
||||
|
||||
INPUT PCM DATA FROM SM II INPUT PCM DATA FROM DSP
|
||||
2. Read byte of PCM data 8. Wait for the MSB of the WRITE DATA/
|
||||
from DAC PORT (offset COMMAND PORT (offset 0x0C) to equal
|
||||
0x0F). 0.
|
||||
3. Wait for correct timing 9. Write 0x20 command (8 BIT ADC INPUT)
|
||||
and repeat step 2 until to the WRITE DATA/COMMAND PORT.
|
||||
end of transfer. 10. Wait for the MSB of the WRITE DATA/
|
||||
COMMAND PORT (offset 0x0C) to equal
|
||||
1.
|
||||
11. Read byte of PCM data from the READ
|
||||
DATA PORT (offset 0x0A).
|
||||
12. Wait for correct timing and repeat
|
||||
steps 8 through 11 until end of
|
||||
transfer.
|
||||
----------------------------------------------------------------------
|
||||
NON-DMA OUTPUT OF 8 BIT PCM SOUND DATA
|
||||
|
||||
SOUND MASTER II SOUND BLASTER
|
||||
--------------------------- --------------------------------
|
||||
INITIALIZE SM II FOR OUTPUT INITIALIZE THE DSP FOR OUTPUT OF PCM DATA
|
||||
1. Set up timing method. 1. Reset the DSP chip by writing a '1'
|
||||
to the RESET PORT (offset 0x06).
|
||||
2. Wait 3 micro-seconds.
|
||||
3. Write a '0' to the RESET PORT.
|
||||
4. Insure that the DSP was initialized
|
||||
by polling for '0xAA' at the READ
|
||||
DATA PORT (offset 0x0A)
|
||||
5. Wait for the MSB of the WRITE DATA
|
||||
COMMAND PORT (offset 0x0C) to equal
|
||||
0.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
6. Write 0xD1 command (TURN ON SPEAKER)
|
||||
to the WRITE DATA/COMMAND PORT.
|
||||
7. Set up timing method.
|
||||
|
||||
OUTPUT PCM DATA FROM SM II INPUT PCM DATA FROM DSP
|
||||
2. Read byte of PCM data 8. Wait for the MSB of the WRITE DATA/
|
||||
from DAC PORT (offset COMMAND PORT (offset 0x0C) to equal
|
||||
0x0F). 0.
|
||||
3. Wait for correct timing 9. Write 0x10 command (8 BIT ADC OUTPUT)
|
||||
and repeat step 2 until to the WRITE DATA/COMMAND PORT.
|
||||
end of transfer. 10. Wait for the MSB of the WRITE DATA/
|
||||
COMMAND PORT (offset 0x0C) to equal 1.
|
||||
11. Write a byte of PCM data to the WRITE
|
||||
DATA/COMMAND PORT (offset 0x0C).
|
||||
12. Wait for correct timing and repeat
|
||||
steps 8 through 11 until end of
|
||||
transfer.
|
||||
----------------------------------------------------------------------
|
||||
DMA INPUT OF 8 BIT PCM SOUND DATA
|
||||
|
||||
SOUND MASTER II SOUND BLASTER
|
||||
--------------------------- --------------------------------
|
||||
INITIALIZE THE SM II FOR INPUT INITIALIZE THE DSP FOR INPUT OF PCM DATA
|
||||
1. Disable VMDMA on the sm II 1. Reset the DSP chip by writing a '1'
|
||||
by writting any value to to the RESET PORT (offset 0x06).
|
||||
the DISABLE VMDMA PORT 2. Wait 3 micro-seconds.
|
||||
(offset 0x0D). 3. Write a '0' to the RESET PORT.
|
||||
4. Insure that the DSP was initialized
|
||||
by polling for '0xAA' at the READ
|
||||
DATA PORT (offset 0x0A)
|
||||
5. Wait for the MSB of the WRITE DATA
|
||||
COMMAND PORT (offset 0x0C) to equal
|
||||
0.
|
||||
6. Write 0xD3 command (TURN OFF SPEAKER)
|
||||
to the WRITE DATA/COMMAND PORT.
|
||||
|
||||
2. Setup 8237 DMA controller 7. Setup 8237 DMA controller and IRQ
|
||||
and IRQ handlers. handlers.
|
||||
|
||||
3. Write control byte to the 8. Wait for the MSB of the WRITE DATA
|
||||
8254 controller on the COMMAND PORT to equal 0.
|
||||
SM II. 9. Write 0x40 command (SET TIME CONSTANT)
|
||||
4. Write LSB of the input rate to the WRITE DATA/COMMAND PORT.
|
||||
to the 8254 on the SM II. 10. Wait for the MSB of the WRITE DATA
|
||||
5. Write MSB of the input rate COMMAND PORT to equal 0.
|
||||
to the 8254 on the SM II. 11. Write one byte value to WRITE DATA/
|
||||
COMMAND PORT for desired input rate.
|
||||
|
||||
6. Enable VMDMA on the SM II 12. Wait for the MSB of the WRITE DATA
|
||||
by writing any value to the COMMAND PORT to equal 0.
|
||||
ENABLE VMDMA PORT (offset 13. Write 0x24 command (8 BIT DMA INPUT)
|
||||
0x0E). to the WRITE DATA/COMMAND PORT.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DMA OUTPUT OF 8 BIT PCM SOUND DATA
|
||||
|
||||
SOUND MASTER II SOUND BLASTER
|
||||
--------------------------- --------------------------------
|
||||
INITIALIZE THE SM II FOR OUTPUT INITIALIZE THE DSP FOR OUTPUT OF PCM DATA
|
||||
1. Disable VMDMA on the sm II 1. Reset the DSP chip by writing a '1'
|
||||
by writting any value to to the RESET PORT (offset 0x06).
|
||||
the DISABLE VMDMA PORT 2. Wait 3 micro-seconds.
|
||||
(offset 0x0D). 3. Write a '0' to the RESET PORT.
|
||||
4. Insure that the DSP was initialized
|
||||
by polling for '0xAA' at the READ
|
||||
DATA PORT (offset 0x0A)
|
||||
5. Wait for the MSB of the WRITE DATA
|
||||
COMMAND PORT (offset 0x0C) to equal
|
||||
0.
|
||||
6. Write 0xD2 command (TURN ON SPEAKER)
|
||||
to the WRITE DATA/COMMAND PORT.
|
||||
|
||||
2. Setup 8237 DMA controller 7. Setup 8237 DMA controller and IRQ
|
||||
and IRQ handlers. handlers.
|
||||
|
||||
3. Write control byte to the 8. Wait for the MSB of the WRITE DATA
|
||||
8254 controller on the COMMAND PORT to equal 0.
|
||||
SM II. 9. Write 0x40 command (SET TIME CONSTANT)
|
||||
4. Write LSB of the input rate to the WRITE DATA/COMMAND PORT.
|
||||
to the 8254 on the SM II. 10. Wait for the MSB of the WRITE DATA
|
||||
5. Write MSB of the input rate COMMAND PORT to equal 0.
|
||||
to the 8254 on the SM II. 11. Write one byte value to WRITE DATA/
|
||||
COMMAND PORT for desired input rate.
|
||||
6. Enable VMDMA on the SM II 12. Wait for the MSB of the WRITE DATA
|
||||
by writing any value to the COMMAND PORT to equal 0.
|
||||
ENABLE VMDMA PORT (offset 13. Write 0x14 command (8 BIT DMA OUTPUT)
|
||||
0x0E). to the WRITE DATA/COMMAND PORT.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
For more demanding emulation I thought it might be a neat idea if
|
||||
DOSBox could use the KVM virtualization driver in Linux (and eventually,
|
||||
equivalent interfaces in other OSes) which could then be selectable
|
||||
by setting core=vmx.
|
||||
|
||||
To explain: Almost all modern CPUs have virtualization extensions
|
||||
built in (Intel VMX and AMD AMD-V). In cases where a DOS or Windows
|
||||
game is very demanding, why not code DOSBox to allow using those
|
||||
virtualization extensions? If done right, the game could run at
|
||||
almost native speed of the processor. It would also open the
|
||||
possibility of running more modern OSes under DOSBox (ones that
|
||||
would normally run too slow in the full and dynamic cores).
|
||||
|
Reference in New Issue
Block a user