Commit Graph

35 Commits

Author SHA1 Message Date
Volker Ruppert
ad4808cbda - checked in floppy timer 'idle' patch from Jeroen Janssen <japj@darius.demon.nl>
- just return without a panic when no floppy command is pending
2002-02-27 18:16:30 +00:00
Volker Ruppert
30ea11e08d - reset function clears DMA and IRQ line 2002-02-09 13:22:43 +00:00
Volker Ruppert
ca5a805aff - behaviour of floppy command 'sense interrupt status' after reset fixed
(DLX linux boots again)
- new function raise_interrupt() sets variables and calls raise_irq()
2002-02-06 18:51:48 +00:00
Volker Ruppert
ad072e2bc6 - implementation of the edge triggered IRQ mode
- new functions raise_irq() and lower_irq()
- all trigger_irq() / untrigger_irq() calls are replaced by the new functions
- REMARK: timer IRQ handling is not correct but it works
- TODO: IOAPIC IRQ handling needs to be changed
2002-01-29 17:20:12 +00:00
Volker Ruppert
e472507616 - set_media_status() sets the media state for the simulation interface too 2002-01-27 21:56:53 +00:00
Volker Ruppert
a373e8dc12 - software reset doesn't clear selected data rate
- IRQ is cleared when the result phase is complete
2002-01-23 20:23:07 +00:00
Volker Ruppert
2892dbdb08 - track0 bit added to the result of the 'get status' command
- length of 'configure' floppy command fixed
- busy flag is set until the result of a read/write command is complete
- read/write access to unsupported address causes a BX_ERROR, not a BX_PANIC
- commented BX_INFO statements removed
2002-01-17 21:20:12 +00:00
Volker Ruppert
d5b13d3131 - second set of changes to bochs floppy support.
* floppy command 'format track' implemented
  * read and write operations with MT=0 are working now
    (function 'increment_sector()' updated)
  * result code of floppy command 'get status' fixed
  * flag FS_MS_DIO is not set while the 'configure' floppy command is pending
2001-12-28 16:38:13 +00:00
Volker Ruppert
328bd4fb84 - fixed the behaviour of some floppy commands (Windows 95 driver works now)
* diskette controller data register returns last result if no new data
    is available
  * reset will be activated when the reset bit is changed to normal operation
  * reset sets the error bits in status register 0
  * write access to port 0x3f4 will cause a BX_ERROR now
  * unsupported and invalid floppy commands are setting the error status bit
    'invalid command' - BX_PANIC not necessary
  * flag FS_MS_DIO is not set while a floppy command is pending
  * floppy command 'specify': cause a BX_ERROR when non-DMA mode is selected
  * floppy command 'sense interrupt status' returns an error is no interrupt
    is pending
  * floppy command 'read ID' sets the 'busy' flag and returns no data if the
    motor is not on
  * removed SIMX86 section (not defined in bochs)
  * define variable 'sTemp' for win32 only
2001-12-27 09:30:31 +00:00
Bryce Denney
585d11de57 - print strerror in some log message 2001-10-07 03:28:45 +00:00
Bryce Denney
b974699ce6 - include <windows.h> on win32 platforms so that we get a definition of
wsprintf
2001-10-05 14:01:52 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Bryce Denney
df50cd50fd - 2 fixes: use S_IFBLK again instead of comparing the st_mode directly
- we must use #if BX_WITH_WIN32, not #ifdef because it's always defined
2001-10-01 17:23:45 +00:00
Bryce Denney
388fb0385f - commit Don Becker's fixes for win32 raw floppy and floppy disk images 2001-10-01 17:20:08 +00:00
Bryce Denney
0640ab3b04 - attempt to fix bug [ #439945 ] Floppy drive read input error checking. 2001-09-29 03:29:27 +00:00
Bryce Denney
dd0d8a8524 - use #if BX_WITH_MACOS around fd_write too. I meant to do this the
first time...
2001-09-26 17:35:51 +00:00
Bryce Denney
1ef0b3c6ef - use #if BX_WITH_MACOS around the special fd_read and fd_write code, since
MacOS X behaves more like unix now.
2001-09-26 00:19:44 +00:00
Todd T.Fries
28885e4973 some INFO->DEBUG/ERROR cleanups 2001-08-31 16:06:32 +00:00
Gregory Alexander
0539a04e3b Fix a filehandle leak.
Modified Files:
 	floppy.cc
2001-08-23 13:02:50 +00:00
Todd T.Fries
4f1c151520 Move Init $ to ::init() 2001-06-27 20:27:49 +00:00
Todd T.Fries
f833500359 some reformat, various misc stuff with Init, introduce $ 2001-06-27 20:11:10 +00:00
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
ec0fbf18bc - convert nearly all bx_options to parameter form. All options that have
been converted into parameters temporarily have the letter "O" appended
  to their name.  I don't want to keep it this way, but it has helped
  in the conversion process because the compiler refuses to compile the
  old uses of the name.  Before I started using the "O" trick, there were
  many bugs like this:   if (bx_options.diskc.present) {...}
  This was legal with the new parameters, but it was testing whether the
  parameter structure had been created, instead of testing the value of
  the present parameter.  Renaming present to Opresent turns this into
  a compile error, which points out the incorrect use of the param.
- the "--disable-control-panel" no longer works, I'm afraid.  I can no
  longer support this and continue progress.
2001-06-20 14:01:39 +00:00
Todd T.Fries
12985edb26 setprefix now uses a variable length name as a string for an argument 2001-06-19 21:36:09 +00:00
Todd T.Fries
a01a26b399 remove \n 2001-06-13 17:01:36 +00:00
Bryce Denney
a66bf0edd3 - oops, the previous revision of floppy.cc needs floppy_xfer to return
void, not Bit32u.  Fixed in this revision.
2001-06-13 07:08:04 +00:00
Bryce Denney
7a095b60e4 - now floppy controller returns a proper error response if you try to write
a read-only disk image.  For systems such as DOS that actually use the
  BIOS services, it was also necessary to add code in int13_diskette_function
  to recognize a write-protected error and return the correct error
  status code (AH=3, Carry Set).
2001-06-13 07:06:10 +00:00
Bryce Denney
6ecd58beb9 - NOT A COMPLETE FIX!
now floppy.cc no longer crashes if you try to open a write-protected
  disk or read-only disk image.  Instead, it tries a second time to
  open the image read-only and only panics if this also fails.  If the
  image is opened read-only, a readonly flag is set
  (bx_floppy.s.media[drive].read_only).  If you try to write the floppy
  when this flag is set, the write silently fails except for some messages
  into the log.  Instead of failing silently we should learn what the
  floppy controller would really do in this situation and emulate it.
2001-06-13 00:30:34 +00:00
Todd T.Fries
2bbb1ef8eb strip '\n' from BX_{INFO,DEBUG,ERROR,PANIC}
don't need it, moved the output of it into the general io functions.
saves space, as well as removes the confusing output if a '\n' is left off
2001-05-30 18:56:02 +00:00
Todd T.Fries
aa8081aff3 cleanup output more 2001-05-24 14:08:54 +00:00
Todd T.Fries
cd01453c9d cleanup output 2001-05-23 19:36:55 +00:00
Todd T.Fries
bdb89cd364 merge in BRANCH-io-cleanup.
To see the commit logs for this use either cvsweb or
cvs update -r BRANCH-io-cleanup and then 'cvs log' the various files.

In general this provides a generic interface for logging.

logfunctions:: is a class that is inherited by some classes, and also
.   allocated as a standalone global called 'genlog'.  All logging uses
.   one of the ::info(), ::error(), ::ldebug(), ::panic() methods of this
.   class through 'BX_INFO(), BX_ERROR(), BX_DEBUG(), BX_PANIC()' macros
.   respectively.
.
.   An example usage:
.     BX_INFO(("Hello, World!\n"));

iofunctions:: is a class that is allocated once by default, and assigned
as the iofunction of each logfunctions instance.  It is this class that
maintains the file descriptor and other output related code, at this
point using vfprintf().  At some future point, someone may choose to
write a gui 'console' for bochs to which messages would be redirected
simply by assigning a different iofunction class to the various logfunctions
objects.

More cleanup is coming, but this works for now.  If you want to see alot
of debugging output, in main.cc, change onoff[LOGLEV_DEBUG]=0 to =1.

Comments, bugs, flames, to me: todd@fries.net
2001-05-15 14:49:57 +00:00
Bryce Denney
a6fef54678 - update copyright dates to 2001 for all mandrake headers
- for bochs files with other header, replaced with current mandrake header
2001-04-10 02:20:02 +00:00
Bryce Denney
cf780f13ce - applied patch from Don Becker. Bypass fstat when opening WIN32 raw
floppy disk.
2001-04-10 02:17:43 +00:00
cvs
beff63eb32 - entered original Bochs snapshot bochs-2000_0325a.tar.gz from
ftp.bochs.com
2001-04-10 01:04:59 +00:00