ã仰天ãã®ã®ãã£ã¹ã±ãããã«ã¯ã¡ã£ã¨ã仰天ããªãã¨ãã話
å°ãã¬ãããªãã¯ããã¸ã¼ã®ãã¨ãæ¸ãã¦ãã£ã¦ãæãããæã£ãã®ã§å½æã®ãã¨ãæ¯ãè¿ã£ã¦æ¸ãã¦ã¿ã¾ãã
仰天ãã®ã®ãã£ã¹ã±ãã(æ¬ã®è«)
http://cpplover.blogspot.com/2008/10/blog-post.html
ä¸ä½èª°ããã®ãã£ã¹ã¯ãã©ã¼ããããæåã§æ§ç¯ããä½ãèãã¦ããã®ãã
ãããç¥ããããçºå£²å ããã®è¦æ±ãæºãããããä½é±éã試è¡é¯èª¤ããä¸ã§ã®
ç£ç©ãªã®ã ãããããããã¯ãæãããåã奴ã§ããããä¸æ¥ç¨ã§ããããä»äº
ã®ãã¡ãã¨æ°è»½ã«æ§ãã¦ãäºããªããã£ã¦ã®ããã®ããç´ æ´ãããé¸åã ã
ã¡ãã£ã¨ãã¡ãã£ã¨ï¼ï¼ãããªã®ãå ¨ç¶åããªãã£ããï¼ï¼
ã¾ããæ··å¨ãã©ã¼ãããã¨ã¯ãä¸ã®ä¸ã«ã¯åã奴ãããããã®ã ããã®æã
FDãç¬èªãã©ã¼ãããã«ãã¦å®¹éã稼ãã¨ããæè¡ããã£ãã¨èãããããã¯
ç¥ããªãã£ãã
å°å¦çã®ã¨ãã«DIH(Double Index Holes)ãããã¯ããéçºããç§(â http://d.hatena.ne.jp/yaneurao/20040805)ããããã°ãç¬èªãã©ã¼ãããã§å®¹éã稼ãã®ã¯åºæ¬ä¸ã®åºæ¬ã§ããã
ãããã¯ãã¨ãã¦ã2HDã®FDã§ã1ã»ã¯ã¿ã ã2DDãã©ã¼ãããããããFDC(Floppy Disk Controller)ã®ãã°ãå©ç¨ãã¦ãæ¬æ¥æ¸ããªããã¼ã¿ãæ¸ãè¾¼ãã ãããã®ãå¿ é ãã¯ããã¯ã§ããã
ä¾ãã°ãSHARPã®X1ã·ãªã¼ãºã¯ã¯ãªã¼ã³è¨è¨ã®ãããBIOS/ROMã«ç¸å½ãããã®ããªãã£ãã®ã§ãããããããIPL(ï¼Initial Program Loaderâboot loader)ããã¼ãã¡ãã£ã¢ or FDDããããã°ã©ã ãèªã¿è¾¼ãã ãã¨ã¯ãèªåã§(BIOSã®åãåããã«)floopyã«ã¢ã¯ã»ã¹ããå¿ è¦ãããã¾ããã
å¸è²©ã®ã½ãããåºããªãã°ãéä¸loadããã¿ã¤ãã®ã²ã¼ã ã¯ãããªããFDDã¢ã¯ã»ã¹ã«ã¼ãã³ã¯èªåã§æã£ã¦ããå¿ è¦ãããã¾ããã
ã¤ã¾ããå½æã®åç¨ã½ãããåºãã¦ãã誰ãããFDCã«ã¢ã¯ã»ã¹ãã¦ãfloopyãå転ãããseekãã¦ãindex holeãæ¤åºãã¦ã1ã»ã¯ã¿èªã¿åºã/æ¸ãåºãã¨ããããã°ã©ã ãæ¸ããããã§ãã
ããã¾ã§æ¸ãã¦ããã°ãformatterãæ¸ãã®ã¯å®¹æã§ããfile systemãèªåã®ãã®ã§è¯ãããå ´åã«ãã£ã¦ã¯file systemããæã£ã¦ããªãã¨ãè¯ãã®ã§ããFDã¾ããã¨ã1æ¬ã®streamã®ããã«æ±ã£ã¦è¯ãã£ãã®ã§ãããã²ã¼ã ã®ããããã¼ã¿ã¯ãåã¹ãã¼ã¸ãã¨ã«ãã©ãã¯15ãã1ãã©ãã¯ãã¤ä½¿ãããã¨ãããããä¹±æ´ã許ããã¾ããã
ãããããä¾ãã°ã1ãã©ãã¯ã®ã»ã¯ã¿æ°ãå¤æ´ããããã»ã¯ã¿çªå·ãé£ã°ãé£ã°ãã«(interleaveã§)ãã©ã¼ããããããã®ã¯ãèªåã®formatterãã¡ãã£ã¨æ¸ãç´ãã ãã§æ¸ã¿ã¾ããã
ç§ãåãã¨æã£ãã®ã¯ãSHARPã®X1ç¨ã®ããªãã¤ãã¼ãã§ãã次ã®ãããã®ãã¼ãä¸ã«ãBGMãéåãã¾ããã§ãããX1turboã·ãªã¼ãºã«ã¯CTC(Counter Timer Circuit)ã¨ããã¤ã³ã¿ã¼ãã«å²ãè¾¼ã¿ãå®ç¾ããããã®æ©æ§ãããããããããã¨ãããã®ãæ¯è¼ç容æã§ã¯ããã®ã§ãããX1ã·ãªã¼ãº(â X1turboã·ãªã¼ãº)ã«ã¯CTCã¯æè¼ããã¦ããããããã¯ããªãã¡ã1ã»ã¯ã¿ã®èªã¿è¾¼ã¿ã«å¿ è¦ãªã¯ããã¯ãè¨ç®ãã¦ããã¦ã1ã»ã¯ã¿ã®èªã¿è¾¼ã¿ãã¨ã«BGMãåçããã«ã¼ãã³ãå¼ã³åºãã¦ããå¿ è¦ãããã¾ããã
ã¾ããFDã®èªã¿åºãã«ãããæéã¯ä¸å®ã§ã¯ãªããBGMåçã«ã¼ãã³ãå¼ã³åºãããã¿ã¤ãã³ã°ã¯jitterringãä¼´ãã®ã§ãååã«å¼ã³åºãããæå»ããã®çµéæéããã©ã¡ã¼ã¿ã¨ãã¦æ¸¡ãã¦è£æ£ããå¿ è¦ãããã¾ãããã¾ãããããZ80ã¢ã»ã³ãã©ã§æ¸ãã®ã¯ãªããªãè·äººè¸çã§ã¯ããã®ã§ãããå½æãåç¨ã²ã¼ã ãéçºãã¦ããç¾å ´ã®ããã°ã©ããªããã£ã¦åºæ¥ãªããã¨ã¯ãªãç¯å²ã§ããã
ã¨ããããBGMåçããã¦ããã¨ããã®å¦çæéã«ãã£ã¦FDãå転ãã¦ãã¾ãã次ã®ã»ã¯ã¿èªã¿åºããéã«åããªããªã£ã¦ãã¾ãã®ã§ãã»ã¯ã¿ãinterleaveããå¿ è¦ããã£ãã®ã§ãã
ãã ãç§ã¯æ°å¹´åã«ããªãã¤ãã¼ãã®å¶ä½è ã§ããåææ°ã¨è©±ãæ©ä¼ããã£ãã®ã§ããã®ã¸ãã®äºæ ã確èªã®ããèãã¦ã¿ãã¨ãããããã(ç¬èªãã©ã¼ãããã«ããã®)ã¯ãBGMåçã®ããã¨ããããã¯ãFDDã®å®¹éãå¢ããæå³åãã®ã»ãã大ãããã¨è¨ããã¦ãã¾ãããã
å°ã話ããæ»ãã¦ãå½æã®ã²ã¼ã ã®å¤§åã«ã¯ãæ¬å½ã«æ§ã ãªãããã¯ããããã£ã¦ãã¾ãããããã¯ãããã¦ãã®ã½ããã¡ã¼ã«ã¼ãèªåã§formatterãä½ã£ã¦ããããããããã¡ãã£ã¨å·¥å¤«ãã¦ããããã¯ããããããã¨ã¯ãã»ã©å°é£ã§ã¯ãªãã£ãããã§ããé¨åçã«unformatã«ããããä¸å®å®ããã(èªã¿åºããã¨ã«å¤ãå¤ãã)ãæ¸ãè¾¼ãã ããFDDã«ç´ãæãã§å転æ°ãé ããã¦æ¸ãè¾¼ã¿ããããã¿ã¼ã²ãããã·ã³ã®FDCã§ã¯æ¸ãè¾¼ã¿ç¡ããã¼ã¿ãå¥ã®FDCãæã¤æ©ç¨®ããæ¸ãè¾¼ãã ãâ¦ã
ãããªç¶æ³ã§ããããã2ã¤ã®æ©ç¨®ã§ãã¼ãã»ã¯ã¿ãç°ãªããªãããããå©ç¨ãã¦ã©ã¡ãã®æ©ç¨®ã§ã§ãç«ã¡ä¸ããæ··æFDãä½ããã¨ã¯æ飯åã ã£ãããã§ãããããã¯ãåããã¼ãã»ã¯ã¿ã§ãã£ã¦ãããã¼ãã®éããæ¤ç¥ãã¦ãã©ã³ããããããCPUãç°ãªããªãããã¾ããã©ã³ãããã³ã¼ããæ¸ãã¦ãã©ã¡ãã®æ©ç¨®ã§ãåãããã«ãããã¨ã¯å½æã®éçºè ãªã誰ã§ã(?)åºæ¥ãããã§ããç§ããå¤åã«æ¼ããããããFDãä½ã£ããã¨ãããã¾ãã
åæã«ã¯ããããã¯ãæãããåã奴ã§ããããä¸æ¥ç¨ã§ããããä»äºã®ãã¡ãã¨æ°è»½ã«æ§ãã¦ãäºããªããã£ã¦ã®ããã®ãããã¨ããã¾ããããã®äººã¯ä¸æ¥ã©ãããã1æéããããããªãã£ãã¨æãã¾ããã