Update of /cvsroot/arcem/arcem/arch In directory vz-cvs-4.sog:/tmp/cvs-serv3122/arch
Modified Files: Tag: arcem-fast fdc1772.c Log Message: Fix floppy access causing guest OS to crash on fast host machines * arch/fdc1772.c - Adjusted the FDC update rates so they roughly match real floppy speeds. If things happen too fast (relative to the IOC timers) RISC OS just crashes horribly, so the fixed rates that were used previously worked on slow hosts but failed on fast ones. * armemu.c - Fix the old ARMul_Emulate26 implementation to still work (undefine FLATPIPE) Index: fdc1772.c =================================================================== RCS file: /cvsroot/arcem/arcem/arch/fdc1772.c,v retrieving revision 1.31.2.3 retrieving revision 1.31.2.4 diff -u -d -r1.31.2.3 -r1.31.2.4 --- fdc1772.c 27 Oct 2011 20:57:31 -0000 1.31.2.3 +++ fdc1772.c 2 Nov 2011 22:02:30 -0000 1.31.2.4 @@ -22,6 +22,7 @@ //#include <unistd.h> #include "../armdefs.h" +#include "../armemu.h" #include "armarc.h" #include "ControlPane.h" @@ -100,10 +101,11 @@ #define IS_CMD(data, cmd) \ (((data) & CMD_ ## cmd ## _MASK) == CMD_ ## cmd) -#define READSPACING 1 -#define WRITESPACING 1 -#define READADDRSTART 50 -#define SEEKDELAY 1 +/* Assuming we get called every 250 cycles by FDCHDC_Poll, these are sensible delay counters for us to use: */ +#define READSPACING MAX(1,(ARMul_EmuRate/(250*31250))) /* 250kbps data rate */ +#define WRITESPACING MAX(1,(ARMul_EmuRate/(250*31250))) +#define READADDRSTART MAX(50,(ARMul_EmuRate/(250*50))) /* At 300RPM, and 5 sectors per track, that's 1/25th of a second between each sector. But use a delay 1/50th since we'll usually be in the area between two sectors */ +#define SEEKDELAY MAX(1,(ARMul_EmuRate/(250*31250))) #define BIT_BUSY 1 #define BIT_DRQ (1<<1) ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 -- arcem-cvs mailing list arcem-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/arcem-cvs