tag:blogger.com,1999:blog-43617332932165828542024-03-05T00:43:57.484-08:00Adrian Chadd's RamblingsAdrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.comBlogger304125tag:blogger.com,1999:blog-4361733293216582854.post-50345727306129331142023-09-20T17:30:00.003-07:002023-09-20T17:36:30.789-07:00Reinstalling AmigaOS 3.1.4 on my Amiga 2000 or "oh crap it didn't boot"<p>This post is about AmigaOS 3.1.4 on my Amiga 2000. AmigaOS 3.1 from Amiga works fine. However, there are a few interestingly subtle differences between 3.1 and 3.1.4 that are worth knowing about, and they stem from both OS and ROM changes that you need to be aware of.</p><p>Let's start with why I reinstalled it.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh55iBJPz17jjLo3qsoZMIy547s_WCUioyh5tmMFZ8KA1Q-pJSvC1BYxJcLHCAiXF9n07lY5xrYXhEqhG3fCk0hRe2c4MLkPyeyLerQmhUdsypym5MXSq-PSH4N0TtX-zsNl9IfUWj1gcyRaMl9uxDL4CrAGfR8WuKvzyacHVKZQd9WSdiYnIs3UF303AHH/s1286/Screen%20Shot%202023-09-19%20at%2012.55.38%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="612" data-original-width="1286" height="152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh55iBJPz17jjLo3qsoZMIy547s_WCUioyh5tmMFZ8KA1Q-pJSvC1BYxJcLHCAiXF9n07lY5xrYXhEqhG3fCk0hRe2c4MLkPyeyLerQmhUdsypym5MXSq-PSH4N0TtX-zsNl9IfUWj1gcyRaMl9uxDL4CrAGfR8WuKvzyacHVKZQd9WSdiYnIs3UF303AHH/s320/Screen%20Shot%202023-09-19%20at%2012.55.38%20PM.png" width="320" /></a></div><br /><p><br /></p><p>I did it a few months ago and didn't notice that I had only allocated a 10 megabyte OS partition. Oops. So, I figured I'd install it again before I started doing more work on it, and I remembered the hilarity from last time. This time, though, I took more photos to demonstrate it.</p><p>First up, the Amiga 2000. It has the 3.1 ROM from Amiga Forever. I <i>think</i> it doesn't include workbench.library and icons.library in the ROM due to size restrictions. So, you need to have that installed onto your boot media. AmigaOS 3.1.4 does that for you. If you use 3.1 ROMs with earlier installs of AmigaOS then you need to grab those libraries and put them in your SYS: folder yourself.</p><p>So, yes I bought some.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZO_9PPy8uD-Ii9oDNq6h74STIsm_-8uJyak1eLcSpDgMRfsKjfu6uOhxCSUkSer-8tO9ycB60esetTgRWpp2_BhQHM_Y3uH1JIM1lgsPvpyDsA4jihyFU6ZOhAKZTdlP9U1846rtuL3wH6JpBqALHUZjahGNOpSoFUXP1At7UE0S3W1xOnCxIzTNRxDyB/s2094/Screen%20Shot%202023-09-20%20at%205.10.08%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="848" data-original-width="2094" height="130" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZO_9PPy8uD-Ii9oDNq6h74STIsm_-8uJyak1eLcSpDgMRfsKjfu6uOhxCSUkSer-8tO9ycB60esetTgRWpp2_BhQHM_Y3uH1JIM1lgsPvpyDsA4jihyFU6ZOhAKZTdlP9U1846rtuL3wH6JpBqALHUZjahGNOpSoFUXP1At7UE0S3W1xOnCxIzTNRxDyB/s320/Screen%20Shot%202023-09-20%20at%205.10.08%20PM.png" width="320" /></a></div><div><br /></div>Then, the install disk. I have a TF536 in here and 8MB of Zorro-II RAM, hence the large amount of RAM.<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjtSDrl2Jqxwwxin5esEkuaYYFnF2Yhg-JU-WXJif6HL7eM9CAFEjZgyayrmWQ2jhTDsQd_9s82yk6jNG0fR4UyZEuVQLhYAdnhlK_UAzTYDFYD6DY07K69qPXL1YeqGkqsNSpnkpU-n6yqmEsfB8ktwpR72FGcoafRqv_4SJiGwnHWKmJRnIptwAOrX1/s1640/Screen%20Shot%202023-09-20%20at%205.11.05%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1218" data-original-width="1640" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCjtSDrl2Jqxwwxin5esEkuaYYFnF2Yhg-JU-WXJif6HL7eM9CAFEjZgyayrmWQ2jhTDsQd_9s82yk6jNG0fR4UyZEuVQLhYAdnhlK_UAzTYDFYD6DY07K69qPXL1YeqGkqsNSpnkpU-n6yqmEsfB8ktwpR72FGcoafRqv_4SJiGwnHWKmJRnIptwAOrX1/s320/Screen%20Shot%202023-09-20%20at%205.11.05%20PM.png" width="320" /></a></div><br /><div>Anyway, I started off by re-partitioning the drive using the HDToolBox program. It's supplied on the installation disk. Now, the 3.1.4 ROM includes a scsi.device that works with Amiga 600 style IDE, so I don't need any extra stuff to use the CF adapter on the TF536.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR7kPrxG7_BNzwtWCIMTOUlRUTV1tXCxYBo88ls5iUx3JJs0cAy2J-B6lH1wq8WoZ9YmltG3GYH10Ry2llH-Hp1lynKkivS4m2d8y8-59CGLPVtj-lKmKWtGNgSoZT9254ETRIleQhQBTiXZtxvZFcJoV1ndQjYhOsdUx28k3631hnNANnyM5uaBeM9WOM/s1810/Screen%20Shot%202023-09-20%20at%205.12.16%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1336" data-original-width="1810" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR7kPrxG7_BNzwtWCIMTOUlRUTV1tXCxYBo88ls5iUx3JJs0cAy2J-B6lH1wq8WoZ9YmltG3GYH10Ry2llH-Hp1lynKkivS4m2d8y8-59CGLPVtj-lKmKWtGNgSoZT9254ETRIleQhQBTiXZtxvZFcJoV1ndQjYhOsdUx28k3631hnNANnyM5uaBeM9WOM/s320/Screen%20Shot%202023-09-20%20at%205.12.16%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP_KdU6TjugJFstmMXd9sP8_HBlA4niQiM6yUIC9CTFk6BxrBK87xVvBTSiL_b_j-ywQWG-FJ0Zkdi16EDK9LjjB87brG7uQoOCCbqK54SD916mEDzeOzX9yektyj8ONHaC-Uy0dJ62QvZArxQOYkQF4azG5QF7DesFnDUzii_tgNXOyt7bvABpnGEKHem/s1800/Screen%20Shot%202023-09-20%20at%205.12.24%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1336" data-original-width="1800" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP_KdU6TjugJFstmMXd9sP8_HBlA4niQiM6yUIC9CTFk6BxrBK87xVvBTSiL_b_j-ywQWG-FJ0Zkdi16EDK9LjjB87brG7uQoOCCbqK54SD916mEDzeOzX9yektyj8ONHaC-Uy0dJ62QvZArxQOYkQF4azG5QF7DesFnDUzii_tgNXOyt7bvABpnGEKHem/s320/Screen%20Shot%202023-09-20%20at%205.12.24%20PM.png" width="320" /></a></div><br /><p>Oops. My boot partition is too small. Let's delete and reinitialise this.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkUPqiFajiQv5QB1OcPlrNEuYGbfTy6LmcxzWdMbC8lGLvxCPYZY5ceAf_--XO3UMOchfRecIzEqqitcBhbhU4NbUMPkJUsZ1LXXpvqhrSiqy4tPgsXZEEfyDxGQH97lqZqlqwe14JYzBkZvey73j3uFqq1dGh-mHojBQWluLs9PD8DQHUUn1_rhhIhpp1/s1476/Screen%20Shot%202023-09-20%20at%205.12.35%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1170" data-original-width="1476" height="254" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkUPqiFajiQv5QB1OcPlrNEuYGbfTy6LmcxzWdMbC8lGLvxCPYZY5ceAf_--XO3UMOchfRecIzEqqitcBhbhU4NbUMPkJUsZ1LXXpvqhrSiqy4tPgsXZEEfyDxGQH97lqZqlqwe14JYzBkZvey73j3uFqq1dGh-mHojBQWluLs9PD8DQHUUn1_rhhIhpp1/s320/Screen%20Shot%202023-09-20%20at%205.12.35%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1Djt-BmoPI467oM-E9H-7Tn8QVWfzr_QJgg2q4W6IRZPOtqAOhqfrvTn-oHUei1C4zcsntNkHiWMrieH2tGfVAUWmQuC15wv2jvsgvT5FMMo2U_7HGD4-QPfCRc1G61WUHta6gIST_Ih2A2aZD3v3HO0ZOQzAr2u9fSXWz5est6n7ShVnY2pZtrMZM2C/s1642/Screen%20Shot%202023-09-20%20at%205.12.40%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1264" data-original-width="1642" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1Djt-BmoPI467oM-E9H-7Tn8QVWfzr_QJgg2q4W6IRZPOtqAOhqfrvTn-oHUei1C4zcsntNkHiWMrieH2tGfVAUWmQuC15wv2jvsgvT5FMMo2U_7HGD4-QPfCRc1G61WUHta6gIST_Ih2A2aZD3v3HO0ZOQzAr2u9fSXWz5est6n7ShVnY2pZtrMZM2C/s320/Screen%20Shot%202023-09-20%20at%205.12.40%20PM.png" width="320" /></a></div><br /><p>Ok, that's better. Let's save and reboot.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADJTgls330wLQzQmB7pYQ9mgpoWi270cjGBZXokdElxnuFXO0WX8HN5PUCvRLe1kfxQnS2748BKTRAmdW0ybnX2jlSxvjtibMYTzd0PiLVJ3fTRJN2nPTjax6fUorQCpjzGVvWzyJoMhxr2_UPKPGyv4JomIk_6qDCqAdLocr18Nvufj6rAFxhx2PfVnW/s1564/Screen%20Shot%202023-09-20%20at%205.12.46%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1182" data-original-width="1564" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhADJTgls330wLQzQmB7pYQ9mgpoWi270cjGBZXokdElxnuFXO0WX8HN5PUCvRLe1kfxQnS2748BKTRAmdW0ybnX2jlSxvjtibMYTzd0PiLVJ3fTRJN2nPTjax6fUorQCpjzGVvWzyJoMhxr2_UPKPGyv4JomIk_6qDCqAdLocr18Nvufj6rAFxhx2PfVnW/s320/Screen%20Shot%202023-09-20%20at%205.12.46%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDYiZjBy8F-pgGETOvRarVO2CohSMfudb0ANU-lisp3f-HjAxygIjo6lR6O9eIbkyXeSaZmyi9PBDSZLOEPdp1R6vQ0W-gFsK82FHqnlcv9StBJr3BbxFkKJ7QoZRseZ3ZFx6logHkof0PRZts8GGwRu7C8j2V-OtzRPiKhlfGqQIz8ooOAuHWrQcsXwse/s1006/Screen%20Shot%202023-09-20%20at%205.12.51%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="334" data-original-width="1006" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDYiZjBy8F-pgGETOvRarVO2CohSMfudb0ANU-lisp3f-HjAxygIjo6lR6O9eIbkyXeSaZmyi9PBDSZLOEPdp1R6vQ0W-gFsK82FHqnlcv9StBJr3BbxFkKJ7QoZRseZ3ZFx6logHkof0PRZts8GGwRu7C8j2V-OtzRPiKhlfGqQIz8ooOAuHWrQcsXwse/s320/Screen%20Shot%202023-09-20%20at%205.12.51%20PM.png" width="320" /></a></div><br /><p><br /></p>Next - we reboot and reinitialise the disks with a fast format. Here's workbench:<br /><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtI9iINZuUXHwE-j859lyVFFKrAmz58KvD2SQNT1qKtk3BsgnO7xDbEQ643nTbEjbq9CoB1OH-s-feJ2WB0klZgPU5oWumaYXbgKZEyLTdl7IKxgZ0zzpUZwEX0tMNAfshYa3Na7yl6IOtxqM0ZChGQxWAU42katl0a0h7dh4gV5xx91A7NxhteAWBsByR/s1398/Screen%20Shot%202023-09-20%20at%205.12.57%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1054" data-original-width="1398" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtI9iINZuUXHwE-j859lyVFFKrAmz58KvD2SQNT1qKtk3BsgnO7xDbEQ643nTbEjbq9CoB1OH-s-feJ2WB0klZgPU5oWumaYXbgKZEyLTdl7IKxgZ0zzpUZwEX0tMNAfshYa3Na7yl6IOtxqM0ZChGQxWAU42katl0a0h7dh4gV5xx91A7NxhteAWBsByR/s320/Screen%20Shot%202023-09-20%20at%205.12.57%20PM.png" width="320" /></a></div><br /><p></p></div><br /><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT1zTOLEVOX-jmEKHx3Cdkbqo7H9B70cqQonEt5WMWYr6gemXMY3Kd3Ux9-g71CqeaA5S3r7-CxUlH-VnSsd90BNXlo_853YYsO4ITSbXZ5slWU1T08R6b2O_mxej7lQrSguoICNdIiZCwC52uldRyQ7ey4bn8txCopmxZ6qtll5_QKCVDs3FrU97xNDRJ/s1484/Screen%20Shot%202023-09-20%20at%205.13.04%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1128" data-original-width="1484" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT1zTOLEVOX-jmEKHx3Cdkbqo7H9B70cqQonEt5WMWYr6gemXMY3Kd3Ux9-g71CqeaA5S3r7-CxUlH-VnSsd90BNXlo_853YYsO4ITSbXZ5slWU1T08R6b2O_mxej7lQrSguoICNdIiZCwC52uldRyQ7ey4bn8txCopmxZ6qtll5_QKCVDs3FrU97xNDRJ/s320/Screen%20Shot%202023-09-20%20at%205.13.04%20PM.png" width="320" /></a></div><div><br /></div>Easy. Now, we run the installer. And, we select "Intermediary" install - or it won't correctly the detect the machine I am installing on, and thus won't install the right version of libraries that are no longer on the 3.1.4 ROM.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqq_rtS32iH_nfSx_IJ4igRaq33pU9R3kNepKgEKf2b_zKI8lnMWhSZgq02Pta_Ao1znpYdJvu6GzfMDl5MnSGqRT1HuxowQxPxrloPuic0qtsu_k8VbEiRlPaiCx8qvgoA8-La-9PwmaMlsNGmum0A0dpsGr54d4zgBSPo_mrU51BGtQCrKfc8wGFvobX/s824/Screen%20Shot%202023-09-20%20at%205.13.26%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="650" data-original-width="824" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqq_rtS32iH_nfSx_IJ4igRaq33pU9R3kNepKgEKf2b_zKI8lnMWhSZgq02Pta_Ao1znpYdJvu6GzfMDl5MnSGqRT1HuxowQxPxrloPuic0qtsu_k8VbEiRlPaiCx8qvgoA8-La-9PwmaMlsNGmum0A0dpsGr54d4zgBSPo_mrU51BGtQCrKfc8wGFvobX/s320/Screen%20Shot%202023-09-20%20at%205.13.26%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-Wj1FjAXj8di5f_EjhJSIsNgh4JKjo8MOGIYhC4tZqZIMIBy6IGxdBsC7EF7K8Iqhn7zW9L-9MeyoveY7qTp5F9uaoo7L4R-NoEVWilQwqfiAA5zMfXvAUo-azJaIo2OvyqWAnOYTRwIVCwBKUOBZU44mbprJfO-jQa3cDprm2ReWjAo9WRIgKXTGw_X/s1318/Screen%20Shot%202023-09-20%20at%205.13.35%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="966" data-original-width="1318" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-Wj1FjAXj8di5f_EjhJSIsNgh4JKjo8MOGIYhC4tZqZIMIBy6IGxdBsC7EF7K8Iqhn7zW9L-9MeyoveY7qTp5F9uaoo7L4R-NoEVWilQwqfiAA5zMfXvAUo-azJaIo2OvyqWAnOYTRwIVCwBKUOBZU44mbprJfO-jQa3cDprm2ReWjAo9WRIgKXTGw_X/s320/Screen%20Shot%202023-09-20%20at%205.13.35%20PM.png" width="320" /></a></div><br /><div><br /></div><div>And now we begin.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0DyU7M-oWo3C_hB_MFfyGvPjPb21aOH8O-_8vqnJaloOaEBeSdhrwGo-Cil04qg1_kd1-xXC1h1hY6HRzkbpKdv0ovn5awLnuXTEBgUq0WsZjMaGVXtt66G89KyMErTNR8b5zIzyywXHmYgDk4Rg6022t8WsCAFOpjDCKVT9gahLexvVRVxpALmsSGoWA/s650/Screen%20Shot%202023-09-20%20at%205.13.46%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="124" data-original-width="650" height="61" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0DyU7M-oWo3C_hB_MFfyGvPjPb21aOH8O-_8vqnJaloOaEBeSdhrwGo-Cil04qg1_kd1-xXC1h1hY6HRzkbpKdv0ovn5awLnuXTEBgUq0WsZjMaGVXtt66G89KyMErTNR8b5zIzyywXHmYgDk4Rg6022t8WsCAFOpjDCKVT9gahLexvVRVxpALmsSGoWA/s320/Screen%20Shot%202023-09-20%20at%205.13.46%20PM.png" width="320" /></a></div><br /><div><br />Now after a bunch of disk swaps, it'll ask which version of hardware you have.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-YS9ESOarwO-L2Ld2CN8oHZd-g2XyMRU2wLkms7rPgzbX4Zk_bgdz6QMcU2N0F54cWFm_K82Hj5RKOycZ04wSAgLGYmkbGWBfHPgu3SVWjUrJ_RHbUuHEgmn4Ow6Jo61974gQZfdAKT7NnkVvvfvQASb5CGFtcj0OJDhwRb86e7yVs2rFUL1QlmdPVW9T/s1004/Screen%20Shot%202023-09-20%20at%205.14.03%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="826" data-original-width="1004" height="263" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-YS9ESOarwO-L2Ld2CN8oHZd-g2XyMRU2wLkms7rPgzbX4Zk_bgdz6QMcU2N0F54cWFm_K82Hj5RKOycZ04wSAgLGYmkbGWBfHPgu3SVWjUrJ_RHbUuHEgmn4Ow6Jo61974gQZfdAKT7NnkVvvfvQASb5CGFtcj0OJDhwRb86e7yVs2rFUL1QlmdPVW9T/s320/Screen%20Shot%202023-09-20%20at%205.14.03%20PM.png" width="320" /></a></div><br /><div>The first time I did this on the Amiga 2000 I did the Novice install and it asked for my Amiga 600 disks. Well, obviously I didn't have an Amiga 600. But when I bought the disks I didn't have the modules disks either! I had to sleuth around on the internet to find them. So now I have them for my Amiga 500/1000, 1200 and 2000.</div><div><br /></div><div>Anyway, it goes and installs the extra bits and pieces.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhga2Bro7mkDV6y0M5NVkbttoOHJtxy-oBu0Ut3aw2qhPFPtEQ-Ew72fPqfunw9bm4L3zxDTMuZa0aw27Q1tUk9Mm-cr1n5Cu9W4yB22WFDtyrIIe2jsRxNIFolHOmG5sPMGZtxk-evjWU5ZMXmNKX-XbYUWk6TiYDj2EZkytcbR6oknWMbEwRVGdFHLTiG/s1250/Screen%20Shot%202023-09-20%20at%205.14.18%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1032" data-original-width="1250" height="264" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhga2Bro7mkDV6y0M5NVkbttoOHJtxy-oBu0Ut3aw2qhPFPtEQ-Ew72fPqfunw9bm4L3zxDTMuZa0aw27Q1tUk9Mm-cr1n5Cu9W4yB22WFDtyrIIe2jsRxNIFolHOmG5sPMGZtxk-evjWU5ZMXmNKX-XbYUWk6TiYDj2EZkytcbR6oknWMbEwRVGdFHLTiG/s320/Screen%20Shot%202023-09-20%20at%205.14.18%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnAfHJupD484DQ1T3dvIN6d2KFEOAg0fKj1ltbuXZbuQe-YU1X7zWI8REzjxiDw3RYZIbqdAV5O7z9KY2ZBhdeGksO-Xrm3dx-9dFwyuWbzPKqXNZuG67zBauSz6aB7d6hSa0N9Pbd4t5IJXaV96eISGnV52eYzTY8TfgeMeDkDIvVB9N95vf2TIaJKVj/s1250/Screen%20Shot%202023-09-20%20at%205.14.23%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1078" data-original-width="1250" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTnAfHJupD484DQ1T3dvIN6d2KFEOAg0fKj1ltbuXZbuQe-YU1X7zWI8REzjxiDw3RYZIbqdAV5O7z9KY2ZBhdeGksO-Xrm3dx-9dFwyuWbzPKqXNZuG67zBauSz6aB7d6hSa0N9Pbd4t5IJXaV96eISGnV52eYzTY8TfgeMeDkDIvVB9N95vf2TIaJKVj/s320/Screen%20Shot%202023-09-20%20at%205.14.23%20PM.png" width="320" /></a></div><br /><div><br /></div><div>Finally it's done and I am told that I have a 32 bit CPU (which I do) and I need to do some extra work after reboot (which I will.)</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAWNiFK_A6MXjBbdtifTZE4Fmo4C5393n3NGR5SYJi6nTElfCaDShee5TjDv43zIEC_CSgH91p7Qn_INwN07jLdY10xxyG1RD9_jZPC11BHrAlNebcxKfGl-Q2odq7oQxskTi3lWbhgrZjXxkLXU7fl7oGOFBooFTpFebPA5wn6kuEhX1QqFJvfagdsRew/s1030/Screen%20Shot%202023-09-20%20at%205.14.29%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="842" data-original-width="1030" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAWNiFK_A6MXjBbdtifTZE4Fmo4C5393n3NGR5SYJi6nTElfCaDShee5TjDv43zIEC_CSgH91p7Qn_INwN07jLdY10xxyG1RD9_jZPC11BHrAlNebcxKfGl-Q2odq7oQxskTi3lWbhgrZjXxkLXU7fl7oGOFBooFTpFebPA5wn6kuEhX1QqFJvfagdsRew/s320/Screen%20Shot%202023-09-20%20at%205.14.29%20PM.png" width="320" /></a></div><br /><div><br /></div><div>I reboot, and here we are, basic install done. I'm warned again that I should go and install the CPU support stuff.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jhaiVlN1dbNrbE2q2_SVyEzKDXQ-HetL2_vUC-6Qn5uno82HiCMb7d7-fzS4YdRyoDtYWkLyRWK9ClhqH0HBOEQsue7YVVi_AI78rFnL1K3LN5ChiRCoHCzG93JH4lbnNj8dCGqUoGztFf5spuAKDPTzeDoqcW2WOKVuDjjLYBD17H_kp_imCI3RS9A0/s1688/Screen%20Shot%202023-09-20%20at%205.14.36%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1262" data-original-width="1688" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jhaiVlN1dbNrbE2q2_SVyEzKDXQ-HetL2_vUC-6Qn5uno82HiCMb7d7-fzS4YdRyoDtYWkLyRWK9ClhqH0HBOEQsue7YVVi_AI78rFnL1K3LN5ChiRCoHCzG93JH4lbnNj8dCGqUoGztFf5spuAKDPTzeDoqcW2WOKVuDjjLYBD17H_kp_imCI3RS9A0/s320/Screen%20Shot%202023-09-20%20at%205.14.36%20PM.png" width="320" /></a></div><br /><div><br /></div><div>That's it for now. Next time (if I remember) I'll take photos of installing the CPU support toolkit, the network interface driver and then run AmigaTestKit and SysInfo to show it all together. Then after that it'll be reinstalling the network stack, and then on to music editing stuff.</div><div><br /></div>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-59418402168965415392023-01-24T11:17:00.003-08:002023-01-24T11:17:36.205-08:00resistance is not futile, or "why does my amiga 1000 keyboard not work?"<p>I gave my amiga 1000 keyboard cable to a friend so she could complete her Amiga 1000 setup. I then ordered some replacement RJ12 cables (4 wires!) to get mine working.</p><p>But they didn't.</p><p>Let's talk about why.</p><p>Firstly - yes, the cable is a RJ12 4P4C rollover cable. Ie, if you hold both connectors up next to each other and aligned the same way, the left hand pins are numbered "1-2-3-4" and the right hand connector is "4-3-2-1". Don't get this backwards or you'll end up reversing the power to the keyboard and damage stuff. It seems most phone cables are 4-wire RJ-12 and rollover pinout, but it's good to double check.</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvOtiJTEPCX7Ez75m17IDD4__l-hKg1JTmO7SZPTXXtiSB7kYGa5o8fJi1h1fBdU9nB13A_hFQYG-XweKVzGbYlqNGoouHRDBrkPfRHZthQRJ-RNmyS6koKAUrM60fozVHzcHbEpAmnJek4E799w4WlCdBzNgjYPi3HK-12R7BbLvkdGkqHaqNzN28Xw/s806/Screen%20Shot%202023-01-24%20at%2011.13.14%20AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="798" data-original-width="806" height="317" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvOtiJTEPCX7Ez75m17IDD4__l-hKg1JTmO7SZPTXXtiSB7kYGa5o8fJi1h1fBdU9nB13A_hFQYG-XweKVzGbYlqNGoouHRDBrkPfRHZthQRJ-RNmyS6koKAUrM60fozVHzcHbEpAmnJek4E799w4WlCdBzNgjYPi3HK-12R7BbLvkdGkqHaqNzN28Xw/s320/Screen%20Shot%202023-01-24%20at%2011.13.14%20AM.png" width="320" /></a></div><br /><p><br /></p><p>This is different to the early Macintosh keyboard - the RJ12 cable there is straight through. "1-2-3-4" goes to "1-2-3-4".</p><p>But it didn't work. I pulled apart the keyboard and started debugging it ... way too hard. The TL;DR is this. When I powered the keyboard from a 5v dedicated supply it was pulling 5v at around 125mA.</p><p>The cable I was using, straight from the bag:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqKmnwYkbg7n8_XdFKBjl2aQuHwZ_l1otMKyQXwWHtWKYwmGGK7vYlkShvRy67Xsc6p5-SqiS0JVD79R32AlZ-xQ1kEz378-szYDLlZnYWX5aaxB6AsAReaYuxUkL2futlRX7EP0x6khyfUYzffkBXcJGjT7C9TCuJAHaegym10PRSUICTQAsL5osbg/s1740/Screen%20Shot%202023-01-24%20at%2011.05.10%20AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1238" data-original-width="1740" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKqKmnwYkbg7n8_XdFKBjl2aQuHwZ_l1otMKyQXwWHtWKYwmGGK7vYlkShvRy67Xsc6p5-SqiS0JVD79R32AlZ-xQ1kEz378-szYDLlZnYWX5aaxB6AsAReaYuxUkL2futlRX7EP0x6khyfUYzffkBXcJGjT7C9TCuJAHaegym10PRSUICTQAsL5osbg/s320/Screen%20Shot%202023-01-24%20at%2011.05.10%20AM.png" width="320" /></a></div><br /><p>The pinout is fine, but each leg has a 40 ohm resistance. There's no way to get 125mA out of 5v at 80 ohm resistance (+5v and GND, 40 ohms each.) The voltage on the keyboard side was closer to 2v.</p><p>The one I build/crimped until it worked:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGaiw2xMGPCYE1xwml0eAmQGWwsOLDpIqJwK-Ify80AIFQVe-mfZmHJe3urE-WyqJouxEA7K3PWijqP4VWckey43iZZxXKmBnilsPgxoTwXe8Iq0hhvn4LFjVS9dSrnabx5NtUPRbLvWhW_bs-exx4fTr0yRmA_fZm_sBckK5i7rSSWP53CSVwP3IGcg/s1560/Screen%20Shot%202023-01-24%20at%2011.05.24%20AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="954" data-original-width="1560" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGaiw2xMGPCYE1xwml0eAmQGWwsOLDpIqJwK-Ify80AIFQVe-mfZmHJe3urE-WyqJouxEA7K3PWijqP4VWckey43iZZxXKmBnilsPgxoTwXe8Iq0hhvn4LFjVS9dSrnabx5NtUPRbLvWhW_bs-exx4fTr0yRmA_fZm_sBckK5i7rSSWP53CSVwP3IGcg/s320/Screen%20Shot%202023-01-24%20at%2011.05.24%20AM.png" width="320" /></a></div><br /><p>18 ohms now, and can supply ~ 250mA. It was happy with this.</p><p>So if you're looking to replace a keyboard cable with an RJ11/RJ12 from Amazon or some other store, double check the pinout, double check that there's 4 wires in the cable, <u>and</u> double-check the series resistance!</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-40893064489682459192023-01-16T20:06:00.002-08:002023-01-16T20:06:31.894-08:00I got lucky with an Acorn Electron<p> Ah, the <a href="https://en.wikipedia.org/wiki/Acorn_Electron" rel="nofollow" target="_blank">Acorn Electron</a>.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCGiD0hnRjNKzyfF6xDWJRmUJ22WPx1z7pwYjIYAWQ3RXUGjFsj-opbG5O9lGjb9fgxl1M9RfK4q9X-dsikl3uRhWokZcEOxjGmBEDCzKOrYd5GoIOT5WqZAkR4_WOaksL6XsGtTr4j4lLpWpHpI91oskqteG8ukbLjTRCZtlxL0vTbG6OSq_iEUgXA/s732/Screen%20Shot%202023-01-16%20at%208.03.48%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="376" data-original-width="732" height="164" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcCGiD0hnRjNKzyfF6xDWJRmUJ22WPx1z7pwYjIYAWQ3RXUGjFsj-opbG5O9lGjb9fgxl1M9RfK4q9X-dsikl3uRhWokZcEOxjGmBEDCzKOrYd5GoIOT5WqZAkR4_WOaksL6XsGtTr4j4lLpWpHpI91oskqteG8ukbLjTRCZtlxL0vTbG6OSq_iEUgXA/s320/Screen%20Shot%202023-01-16%20at%208.03.48%20PM.png" width="320" /></a></div><br /><p><br /></p><p><br /></p><p>Wait, no. I never had one as a kid, I had access to a couple of BBC micros in my primary school for playing a pirate / math educational game that I have since not found online, and I've never really wanted one. Until a close friend's birthday - at which point I got them one.</p><p>And then we fell down a rabbit hole together.</p><p>So, I bought a dead Electron motherboard. Here you go.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR8apUjuUwctrBhHuwRHVqQNfW8NgNS5Z6nZtskFqPIo0npVid65dj27xgTKpwj2dZMBKd-FSpuojLBe6BGUgST_wpPo0pvw_Vgu55tdLlIkfsw4wqoWDS2_Ih2aij67i6u9pRWmLx0bmIl3_BsCqvS6LnLE3AsmmKcCo-UQ7TfNqs25MsVvmFsOJtQA/s1970/Screen%20Shot%202023-01-16%20at%208.03.17%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1204" data-original-width="1970" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR8apUjuUwctrBhHuwRHVqQNfW8NgNS5Z6nZtskFqPIo0npVid65dj27xgTKpwj2dZMBKd-FSpuojLBe6BGUgST_wpPo0pvw_Vgu55tdLlIkfsw4wqoWDS2_Ih2aij67i6u9pRWmLx0bmIl3_BsCqvS6LnLE3AsmmKcCo-UQ7TfNqs25MsVvmFsOJtQA/s320/Screen%20Shot%202023-01-16%20at%208.03.17%20PM.png" width="320" /></a></div><br /><p><br /></p><p>And the ULA - quite a bit of damaged tracks there.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinMAuEeqEi--yxNmxv86GPxnXNFgjdqweFCDer0CIMoMb5b4AjZmsqWN8Tz0AzU1MQ-JVzm-8z7XQ_-CtJHOzLFkJjY7wZYPXLpVIpsbGAMHCYigkQoZKobC38O8WUGBXO3LMPZyF9XFAhV0B0ZVa2SXCWRTY71_ee9d850a40QqbJA1L1g4n26FVkMQ/s836/Screen%20Shot%202023-01-16%20at%208.03.22%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="630" data-original-width="836" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinMAuEeqEi--yxNmxv86GPxnXNFgjdqweFCDer0CIMoMb5b4AjZmsqWN8Tz0AzU1MQ-JVzm-8z7XQ_-CtJHOzLFkJjY7wZYPXLpVIpsbGAMHCYigkQoZKobC38O8WUGBXO3LMPZyF9XFAhV0B0ZVa2SXCWRTY71_ee9d850a40QqbJA1L1g4n26FVkMQ/s320/Screen%20Shot%202023-01-16%20at%208.03.22%20PM.png" width="320" /></a></div><br /><p><br /></p><p>Yes, the ULA is supposedly dead, like a lot of these Electron PCBs. My goal was to strip the PCB of components and make a replica rev4 board. However, first up, i wanted to see if i could repair it.</p><p><br /></p><p>So, I took off the ULA and fixed up the busted pins. Some copper tape and solder did the trick. One pin was completely missing, and that was quite a challenge to get right.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHhv3LZrvVaq9v5BsDde7nfhYxdAiGYhM2K6YnR8DzLg2Q5Nx5CgLIQJyztUP03s-7D1W1XtzsxhI0mC2iFUMy0CzBqzZQ0LO2xsvYqc5g_zoJkzCzMOY6LphVQlfyk4JkaYvKmaH5ptCcIa0FwWRPEgi2003FDSGmZSVylRNmiFqJ2ZgYHoQ-0muVdw/s708/Screen%20Shot%202023-01-16%20at%204.41.59%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="612" data-original-width="708" height="277" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHhv3LZrvVaq9v5BsDde7nfhYxdAiGYhM2K6YnR8DzLg2Q5Nx5CgLIQJyztUP03s-7D1W1XtzsxhI0mC2iFUMy0CzBqzZQ0LO2xsvYqc5g_zoJkzCzMOY6LphVQlfyk4JkaYvKmaH5ptCcIa0FwWRPEgi2003FDSGmZSVylRNmiFqJ2ZgYHoQ-0muVdw/s320/Screen%20Shot%202023-01-16%20at%204.41.59%20PM.png" width="320" /></a></div><br /><p><br /></p><p>Then I socketed the 6502 CPU and BASIC/OS ROM. The 6502 was already socketed but the soldering job was pretty bad. I tossed the nice machined socket because it was soldered in bad and I didn't want to clean up all the bad solder from on top of the pins, and I instead just whacked a cheap socket down to test.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUOxsPs3rF6aZ7AdYrEYUbRAtJS5NbXuF1DG8IkMLpg5U5lFzX-bbGRRqwwEhN41mo42eXDW08vI5rnpzaPoEyN7eg7DaD47g4WVaByNKwd5g17kTV7x06FpbkWlGJgSjAVlUw9uvPUF7QHA7NhBixMYzPZMqnUWvF2Dulmwsui3vPj-VMgjq2cwSCw/s1856/Screen%20Shot%202023-01-16%20at%204.41.54%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1066" data-original-width="1856" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCUOxsPs3rF6aZ7AdYrEYUbRAtJS5NbXuF1DG8IkMLpg5U5lFzX-bbGRRqwwEhN41mo42eXDW08vI5rnpzaPoEyN7eg7DaD47g4WVaByNKwd5g17kTV7x06FpbkWlGJgSjAVlUw9uvPUF7QHA7NhBixMYzPZMqnUWvF2Dulmwsui3vPj-VMgjq2cwSCw/s320/Screen%20Shot%202023-01-16%20at%204.41.54%20PM.png" width="320" /></a></div><br /><p><br /></p><p>Then I powered it up.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4XKdImDAQIO2UbghvTaN20qEZ5qwyIck4UQmv2_e1m2Chj5xR_ouA5gZZ_VWkceW1PU1JCNGpLThomLe4F9rYHCGrdPCYWAnorpHlNJUonDML3eoCJLr8KPJ5MonoIjEjaXwTxc_-gi9GljGI3Y_-mx6FSUkbfCOc4hAXzpvfDY4q3ZGM1u9Ha0dTGw/s878/Screen%20Shot%202023-01-16%20at%204.41.50%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="758" data-original-width="878" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4XKdImDAQIO2UbghvTaN20qEZ5qwyIck4UQmv2_e1m2Chj5xR_ouA5gZZ_VWkceW1PU1JCNGpLThomLe4F9rYHCGrdPCYWAnorpHlNJUonDML3eoCJLr8KPJ5MonoIjEjaXwTxc_-gi9GljGI3Y_-mx6FSUkbfCOc4hAXzpvfDY4q3ZGM1u9Ha0dTGw/s320/Screen%20Shot%202023-01-16%20at%204.41.50%20PM.png" width="320" /></a></div><br /><p><br /></p><p>Oops. Guess I have a working Acorn Electron. Well, I don't have a case, power supply or keyboard. Guess I'm going to have to make a keyboard for it.</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-35540318156349280332022-12-11T19:36:00.003-08:002022-12-11T19:36:26.653-08:00Who's the /BOSS on the Amiga 2000 ?<p> I slipped and bought a TF536 to put into my Amiga 2000. TL;DR is it's now running, but it took a bit of fiddling to get there. When I was last getting it going I noticed it didn't like any Zorro-II RAM in there, so I simply disabled it (it wouldn't do much) and left it alone. The storage card I'm using (a GVP SCSI job) doesn't do DMA to Zorro-II RAM - it does DMA to/from a 64k IO/RAM window which then the driver memcpy()'s out.</p><p>Whacking it in with the CPU riser I got from amigastore.eu booted up fine as long as no other RAM cards were installed.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EfIcSGWhgPuKeQxbJB1VZIkUzNRrkvk4iJ6qhJkKFSAsUM62JwmPa0B4nvAbTHca66UpfHt0G2gkFFJqWp3yBgrKhDfccUynBQ4H6Oqge9V7L7zNqecO-5xS443pAsAf-sI2gsbM3Rg69HKrBGxSFj1n0kG4IcG2xH1DYO499a5Fi0GPNOinu9lAHA/s1246/Screen%20Shot%202022-12-11%20at%207.30.38%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1246" data-original-width="602" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8EfIcSGWhgPuKeQxbJB1VZIkUzNRrkvk4iJ6qhJkKFSAsUM62JwmPa0B4nvAbTHca66UpfHt0G2gkFFJqWp3yBgrKhDfccUynBQ4H6Oqge9V7L7zNqecO-5xS443pAsAf-sI2gsbM3Rg69HKrBGxSFj1n0kG4IcG2xH1DYO499a5Fi0GPNOinu9lAHA/s320/Screen%20Shot%202022-12-11%20at%207.30.38%20PM.png" width="155" /></a></div><br /><p>If I installed my storage card or any zorro-II RAM cards it just hung. Not fun.</p><p>So then I thought, wait a sec. It's going into the CPU expansion slot, not the CPU socket. And there's this thing called /BOSS which accelerator cards in the CPU expansion slot should assert if they want the DMA and some other signals routed to them rather than the main CPU socket.</p><p>So, I grabbed a different one.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiR6M3kv_xWSXpvc6pApYQ3KgQursPf0lXeJBLy7S_OztU3fuP25Xi8e_Ipv6nmtU_FsK-mK4WG4_TqNt0E4f2otuB39RgACtuBAAqIYtageVrrayaD6Rz4_NV3Pqv8seymRwDsZnPx4CPfgu9wYPFksnxLCCpgACAVSZKzqs_ea27c6B870ipQq97yg/s1598/Screen%20Shot%202022-12-11%20at%207.32.17%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1286" data-original-width="1598" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiR6M3kv_xWSXpvc6pApYQ3KgQursPf0lXeJBLy7S_OztU3fuP25Xi8e_Ipv6nmtU_FsK-mK4WG4_TqNt0E4f2otuB39RgACtuBAAqIYtageVrrayaD6Rz4_NV3Pqv8seymRwDsZnPx4CPfgu9wYPFksnxLCCpgACAVSZKzqs_ea27c6B870ipQq97yg/s320/Screen%20Shot%202022-12-11%20at%207.32.17%20PM.png" width="320" /></a></div><br /><p>This one has a jumper for /BOSS to keep it enabled, and also has the FC0..FC2 pins (indicating the CPU state) also routed.</p><p>I plugged this in and bam.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7QTc_7uwMfKnsCdLFNu8QMgVIlAxJC7x6tvf0I-8EbcMRzaxHiNoD6TLVnYfr1boht06DvN4hIvnn5UwbF3uLvRnQFCx4aGh2q8t2UTdMejlZQ4N2gqLh_Im6kc_AZuWHFjYeAC-aYwr3KGrUSxKk5bQyMTVfEeG6JHrsT-jx8MMIvOUWIrYELTpJvw/s1480/Screen%20Shot%202022-12-11%20at%207.33.29%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="752" data-original-width="1480" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7QTc_7uwMfKnsCdLFNu8QMgVIlAxJC7x6tvf0I-8EbcMRzaxHiNoD6TLVnYfr1boht06DvN4hIvnn5UwbF3uLvRnQFCx4aGh2q8t2UTdMejlZQ4N2gqLh_Im6kc_AZuWHFjYeAC-aYwr3KGrUSxKk5bQyMTVfEeG6JHrsT-jx8MMIvOUWIrYELTpJvw/s320/Screen%20Shot%202022-12-11%20at%207.33.29%20PM.png" width="320" /></a></div><br /><p>(note I didn't leave the 2MB RAM enabled on the storage card after this test; until I'm ready to screw around with programming stuff that explicitly wants to test Zorro-II/Zorro-III space RAM, I'll leave it off.)</p><p>I also tested it with an 8MB Zorro-II RAM expansion (the ZoRAM card that's available on the internet) and it also works fine.</p><p>Anyway TL;DR is - don't forget to ensure your accelerator card installation on an Amiga 2000 has /BOSS asserted, or a bunch of DMA/Zorro-II lines won't get routed to the CPU expansion slot and things won't work right.</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-11105874850151531702022-12-06T22:03:00.006-08:002022-12-15T09:03:41.187-08:00damnit i slipped and (mostly) built an amiga 500<p>EDIT - the original article has an image of the PCB with the floppy power connector mounted the WRONG WAY. </p><p>This is the INCORRECT WAY. Do NOT do it this way!</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyEvsz_vKjmzNCb5MJb1HMptSq2Ail-e2XGwS-mcKlmQQAO3Z_yte0RqrvxHy9m6Gw7Hs7d8lxNRRn2qv17PeP6p6-_Ljtet9SUEn1hNnVapF5YmANg0FDIerrvdVwYfOBD5C5JPGbZ7Ev5mD_IvncWg0GWmsyQ5e2zQlqGznsbyflinvUoDvj4l8n_A/s308/Screen%20Shot%202022-12-15%20at%209.01.32%20AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="252" data-original-width="308" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyEvsz_vKjmzNCb5MJb1HMptSq2Ail-e2XGwS-mcKlmQQAO3Z_yte0RqrvxHy9m6Gw7Hs7d8lxNRRn2qv17PeP6p6-_Ljtet9SUEn1hNnVapF5YmANg0FDIerrvdVwYfOBD5C5JPGbZ7Ev5mD_IvncWg0GWmsyQ5e2zQlqGznsbyflinvUoDvj4l8n_A/s1600/Screen%20Shot%202022-12-15%20at%209.01.32%20AM.png" width="308" /></a></div><br /><p><br /></p><p>TL;DR - I'm half way through building an Amiga 500+ replica. The goal:</p><p></p><ul style="text-align: left;"><li>New PCB</li><li>New clear case</li><li>Actual floppy drive!</li><li>TF534 Accelerator, yes I am interested in FPU stuff for reasons and yes I'm sad about the 4MB of RAM but I'll make do - terriblefire does a great job designing/building/debugging these accelerators and I'm glad they exist!</li><li>ECS Denise, also for reasons</li><li>2MB chip RAM and some slow RAM too because again why not</li><li>3.x ROMs</li></ul><div>The challenges!</div><div><br /></div><div><ul style="text-align: left;"><li>I need a keyboard for it, but my "donor" machines, like my "donor radios", all now work. Hilarious.</li><li>The Amiga 500+ board wasn't well documented for assembly, until I looked. Closer.</li><li>Well, the 8375 Agnus I acquired is a PAL one, so I guess I'm building a PAL Amiga 500+. (Which is fine as you can switch it in software after boot, but STILL.)</li><li>Oh yeah, floppy drives. Ugh.</li></ul><div>Ok, so the PCB. I picked it up from <a href="https://www.tindie.com/products/bobsbits/a500-amiga-500-replica-pcb/">https://www.tindie.com/products/bobsbits/a500-amiga-500-replica-pcb/</a> . There's a link with the component list, and I got them all with some hunting around. I wish I had a "dead-ish" donor Amiga 500 of suitable vintage to grab parts from, but again, all my machines now work. Ha.</div></div><div><br /></div><div>Here's it assembled. Well, mostly.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIKeLw_zClJWDQa-8kAQ6OYhyBnkoUPMb4zj344jOYOBskh75eSSyUis64bIHK9TmevSYJ0Ien5U_dAwMm4jFQnmC-BDLbvI24g-5rKvi0tlF3rJJjf3hImAaY18cArUAzFj8RCk6SqHZi0YUwIiWJo28mSfmIOkIvy6C1TwYbvjDbv74kkUrbwsOfjQ/s1924/Screen%20Shot%202022-12-06%20at%209.49.36%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1432" data-original-width="1924" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIKeLw_zClJWDQa-8kAQ6OYhyBnkoUPMb4zj344jOYOBskh75eSSyUis64bIHK9TmevSYJ0Ien5U_dAwMm4jFQnmC-BDLbvI24g-5rKvi0tlF3rJJjf3hImAaY18cArUAzFj8RCk6SqHZi0YUwIiWJo28mSfmIOkIvy6C1TwYbvjDbv74kkUrbwsOfjQ/s320/Screen%20Shot%202022-12-06%20at%209.49.36%20PM.png" width="320" /></a></div><br /><div>I still have some connectors and the RTC to add. Yes, it's a 2.x workbench ROM. Yes, it boots to ROM fine.</div><div><br /></div><div>Now, what do I do about the jumpers? The instructions don't have the Amiga 500+ rev8 PCB jumper descriptions. Ok, they're in the service manuals. And yeah I can read the schematic, but I wanted to be lazy.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7gA4uo8J8KN2DUqS1ecjqhfZtlF4lx9M2EGqwkDL5KidsJhgn_nuFYCtD2eD7UFOJcMDRMlMRGSIfASLCuNgZ7b4GRrnCclL2dEayynZVsQYKCq7spGtA46T3V-iz9_WzwzMmvSHqStbzkw941o8atg5dsIxgbLaJaV0_3A1HMLruZSTbWJkr_kLjtA/s962/Screen%20Shot%202022-12-06%20at%209.51.51%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="678" data-original-width="962" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7gA4uo8J8KN2DUqS1ecjqhfZtlF4lx9M2EGqwkDL5KidsJhgn_nuFYCtD2eD7UFOJcMDRMlMRGSIfASLCuNgZ7b4GRrnCclL2dEayynZVsQYKCq7spGtA46T3V-iz9_WzwzMmvSHqStbzkw941o8atg5dsIxgbLaJaV0_3A1HMLruZSTbWJkr_kLjtA/s320/Screen%20Shot%202022-12-06%20at%209.51.51%20PM.png" width="320" /></a></div><br /><div>Ok, so I started to look at it. I definitely wanted the 1MB/2MB option. I wanted the expansion RAM to show up in chip RAM to start with. Ok, ok. But, guess what. The PCB has them already kinda done.</div><div><br /></div><div>Here, look closely.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfFDQ7N-CmEHBSIM-BHz5b3sgWxcXikjPZaOAiiF1a6Q2GSR4irV-yueEMjSn_8qhYnXJ2h2v31JoskG1OpHmK1PTTz1CIFowIwI_cLU81NJHQ4Xt-Q_Fufaioi1tVV0lQjyB8Dqt3JoRmgzxQgLwRb_4ZtznJwzVgClWpVbcfpW1l2Ro24Fqj5SKa8A/s570/Screen%20Shot%202022-12-06%20at%209.53.59%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="472" data-original-width="570" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfFDQ7N-CmEHBSIM-BHz5b3sgWxcXikjPZaOAiiF1a6Q2GSR4irV-yueEMjSn_8qhYnXJ2h2v31JoskG1OpHmK1PTTz1CIFowIwI_cLU81NJHQ4Xt-Q_Fufaioi1tVV0lQjyB8Dqt3JoRmgzxQgLwRb_4ZtznJwzVgClWpVbcfpW1l2Ro24Fqj5SKa8A/s320/Screen%20Shot%202022-12-06%20at%209.53.59%20PM.png" width="320" /></a></div><br /><div><br /></div><div style="text-align: left;">JP3 is already done for us. (For 1MB/2MB I need to have them horizontally jumpered, not vertically.)</div><div style="text-align: left;"><br /></div><div style="text-align: left;">And for JP2:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMiyMWnks0VwaJzskev42lDJ71A4YOOqUppKt37Zg9qAbFAVyaAsrY1LYdHmrGft-vpf8o-HINXx_oSNsQwaCgLURilncTIJ2TcE8TsCH3eOny_m8dBExscgqDRwTDsSnv55YSXhIjftmMhLg-0b_zy9V2zWACYcu0HyRBBITEL4D7AceixuxwNBBRYw/s274/Screen%20Shot%202022-12-06%20at%209.54.05%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="230" data-original-width="274" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMiyMWnks0VwaJzskev42lDJ71A4YOOqUppKt37Zg9qAbFAVyaAsrY1LYdHmrGft-vpf8o-HINXx_oSNsQwaCgLURilncTIJ2TcE8TsCH3eOny_m8dBExscgqDRwTDsSnv55YSXhIjftmMhLg-0b_zy9V2zWACYcu0HyRBBITEL4D7AceixuxwNBBRYw/s1600/Screen%20Shot%202022-12-06%20at%209.54.05%20PM.png" width="274" /></a></div><br /><div style="text-align: left;">It turns out the two bottom pins are already joined. I'd have to cut the track to start using the expansion RAM slot as slow RAM (in $C00000) or if/when I fit a Gary Adapter / RAM expansion add-on.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Finally, the case is here and the TF534 is installed and boots up to ROM fine.</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiwW8wuV3LhtnZxMZLguUNiR6VYSXcsmsBFKoozRNK0pnf4A3zM5CsR6w_iyExdjbhOY4N5XngTP3pLWDw-Y2c-A2u8jhMGv8cBnPrYgU-9H0Ec2BAywvzQwxEKK80viM8wBrP0N7_cffUrbJ75RAGefSHmi1u-jn7CzzlWpBs_F_IBylojmnNFcSWRg/s1402/Screen%20Shot%202022-12-06%20at%2010.01.45%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1402" data-original-width="976" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiwW8wuV3LhtnZxMZLguUNiR6VYSXcsmsBFKoozRNK0pnf4A3zM5CsR6w_iyExdjbhOY4N5XngTP3pLWDw-Y2c-A2u8jhMGv8cBnPrYgU-9H0Ec2BAywvzQwxEKK80viM8wBrP0N7_cffUrbJ75RAGefSHmi1u-jn7CzzlWpBs_F_IBylojmnNFcSWRg/s320/Screen%20Shot%202022-12-06%20at%2010.01.45%20PM.png" width="223" /></a></div><br /><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;">I'll finish the installation once the sockets arrive - and yes I may go and borrow my rev5 amiga 500 keyboard and Gotek floppy drive emulator until I get suitable replacements. Or, maybe just design an Amiga 500 keyboard drop-in replacement with cheap cherry MX style switches. Why not.</div><div style="text-align: left;"><br /></div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com3tag:blogger.com,1999:blog-4361733293216582854.post-80608524021515358022022-09-25T19:52:00.005-07:002022-09-27T13:13:42.572-07:00Installing a kickstart ROM adapter in my Amiga 1000, or "Nothing works, and nothing makes sense"<p>The Amiga 1000 is a slick looking machine. It however loads its ROM from floppy disk. The <a href="https://en.wikipedia.org/wiki/Amiga_1000" target="_blank">Wikipedia Article on the Amiga 1000</a> explains why.</p><p>I wanted to put a Kickstart 1.3 ROM in my Amiga 1000. There are adapters out there you can build and install. I chose one, followed the instructions, and it didn't work.</p><p>After a whole lot of digging I finally got it working and now I'm documenting what hilarity I found.</p><p>I started with<a href="https://www.amigaworld.de/hardware/amiga-1000-kickstart-rom-adapter/"> this one</a> from the amiga community. The PCB manufacturing files are available on PCBWAY as a <a href="https://www.pcbway.com/project/shareproject/Amiga_1000_Kickstart_ROM_Adapter.html">shared project</a>. So, I got the board made, did the board mods on my Amiga 1000, and set it up. No bueno.</p><p>Let's go over the mods first before I explain why it didn't work.</p><p>First up, the Amiga 1000 has a pair of small ROMs (lower and upper 8 bits of the data bus) to bootstrap the ROM image from floppy disk, throw it into the write once memory store and then kick it appropriately to take over the ROM memory address range. The ROM address range is $F80000 -> $FFFFFF - a 512KiB region. But, this ROM isn't that big at all.</p><p>The schematic calls out what's going on pretty clearly. This is for the early revision Amiga 1000, with the U5N / U5P ROMs populated.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWY-vgt8REANs0kmSFY9jUVuyUwvBha60xLQWDS8TmzHse_EhjAl-56hw7i-nfdvUXJvFNd6-an_6T8wCV3pR1JW00AjRdt2Zq2a66EMvBnCy0lM22krP9RrG5XvX1bGTLJI3nURw7g1MTSAT_mjm3jkepXgBxupjjio-POWNliYT7KexqKiW8eYDcg/s1114/Screen%20Shot%202022-09-25%20at%207.00.35%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1114" data-original-width="760" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZWY-vgt8REANs0kmSFY9jUVuyUwvBha60xLQWDS8TmzHse_EhjAl-56hw7i-nfdvUXJvFNd6-an_6T8wCV3pR1JW00AjRdt2Zq2a66EMvBnCy0lM22krP9RrG5XvX1bGTLJI3nURw7g1MTSAT_mjm3jkepXgBxupjjio-POWNliYT7KexqKiW8eYDcg/s320/Screen%20Shot%202022-09-25%20at%207.00.35%20PM.png" width="218" /></a></div><br /><p>The /OE lines (pin 22) go to /ROM01 on the PALs, which (among other things) enables the ROMs only when the write-once memory store isn't active and we're in the ROM region.</p><p>But look at the other bits going on.</p><p>First, pin 1 is going to +5 volts, instead of A16. Pin 27 is going to A15 instead of .. the processor R/W pin? Weird. Anyway, let's look at these ROMs.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZskUV8x5uc63VzPQKSKIPW9mSKxTo36bgCvlBTIUx0wYkpwJmdpXeBhVu8yIK7oZ7isumLT_FjzCXSTOk5pM7mzyR0B0e-xOyKJyQuULVmD968YRnDwX9lUGlGlXAjBbuqvjkB-NQrRxsf1FDPKVPQHVJdw0fu_nhxi-Xrf7CsgwOBVjcpWy52BJtjQ/s560/Screen%20Shot%202022-09-25%20at%207.03.39%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="560" data-original-width="502" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZskUV8x5uc63VzPQKSKIPW9mSKxTo36bgCvlBTIUx0wYkpwJmdpXeBhVu8yIK7oZ7isumLT_FjzCXSTOk5pM7mzyR0B0e-xOyKJyQuULVmD968YRnDwX9lUGlGlXAjBbuqvjkB-NQrRxsf1FDPKVPQHVJdw0fu_nhxi-Xrf7CsgwOBVjcpWy52BJtjQ/s320/Screen%20Shot%202022-09-25%20at%207.03.39%20PM.png" width="287" /></a></div><p>First confusing thing here - the ROMs addressing starts from A0 to A14. The 68000 bus however doesn't have an A0 - it's A1 to A23, and then there's upper/lower byte select lines. So, this ROM A0 is the CPU bus A1, the ROM A1 is CPU bus A2, etc.</p><p>Pin 1 is NC - it'd be ROM A15 on a 64k x 8 ROM. Ie, Amiga/68000 A16. And pin 27 is ROM 14, Amiga/68000 A15. That makes sense.</p><p>What's happening with the OTHER /CS line though?</p><p>On U5N/U2N, the /CS2 lines in the schematic to go W2 and W5. The intention looks to be whether A16 or A17 acts as a chip select line to enable either the lower or upper set of ROMs. If you wanted 32KiB ROMs then you'd want A16 to be the /CS2 control. If you wanted 64KiB ROMs then you'd want A17 to be the /CS2 control.</p><p>In theory, if everything is wired up fine, this means you can fit 256KiB of ROMs by fitting four 64KiB ROMs and jumpering things appropriately. You'd want:</p><p></p><ul style="text-align: left;"><li>W2 to be CPU A16</li><li>W1 to be CPU A15</li><li>W3 to be CPU A14</li><li>W4 to be CPU A17</li><li>W5 to go via the 74LS04 to invert A17 as the /CS2 line, so either the U5N/U5P is enabled, or the U2N/U2P is enabled.</li></ul><div>However, this just plainly didn't match what's on my board. After trying a couple times to do the whole mod, I started to question whether the PCB matched the schematic. Hint, it ... didn't.</div><div><br />Here's what the PCB layout looks like, front:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB6cWPwjeRwz0vISbZALbdEGodbHgy_lzN3yqlnQN5QcZgw62B5uxAcKm9Q5EFg5MgqZWbwE6PlOlaNTSpMLLcqGyBzWQ3kL-aCEJLrk8QMiM22osNBrPGCYAxoCDbvHPNqViiRfzOYtT3FXaGpRfwL8h2tnuOVruLrawZS5Sfq_-f6tKqBJEfHRbtkA/s984/Screen%20Shot%202022-09-25%20at%207.13.02%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="984" data-original-width="718" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB6cWPwjeRwz0vISbZALbdEGodbHgy_lzN3yqlnQN5QcZgw62B5uxAcKm9Q5EFg5MgqZWbwE6PlOlaNTSpMLLcqGyBzWQ3kL-aCEJLrk8QMiM22osNBrPGCYAxoCDbvHPNqViiRfzOYtT3FXaGpRfwL8h2tnuOVruLrawZS5Sfq_-f6tKqBJEfHRbtkA/s320/Screen%20Shot%202022-09-25%20at%207.13.02%20PM.png" width="233" /></a></div><p><br /></p>and back:<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBLrwnhAcDYiFvg96BlqmiGEsyyiY7LH-HYMTV5bu8j3hWVnylMurw9Z3Jc_sUCuQOQtck8_c1Kg_bo7qQyyXIJo4N93LRmZwOTV_MeF1FXrvzJqsf22glda6ykQ37ZHsjNo-LUSGVSTVmJHrZDgLM7X2gmtFct36WT_7pIrIm5_8XRrMsBFi_Dm37Bw/s1036/Screen%20Shot%202022-09-25%20at%207.13.33%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1036" data-original-width="662" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBLrwnhAcDYiFvg96BlqmiGEsyyiY7LH-HYMTV5bu8j3hWVnylMurw9Z3Jc_sUCuQOQtck8_c1Kg_bo7qQyyXIJo4N93LRmZwOTV_MeF1FXrvzJqsf22glda6ykQ37ZHsjNo-LUSGVSTVmJHrZDgLM7X2gmtFct36WT_7pIrIm5_8XRrMsBFi_Dm37Bw/s320/Screen%20Shot%202022-09-25%20at%207.13.33%20PM.png" width="204" /></a></div><br /><p>You can see where you need to cut W1, W2, W3, W4 (and W5, but I didn't) to turn it into a selectable jumper set.</p><p>So, I buzzed out both the ROM board and the Amiga 1000 board to see what was going on. And what I found was ... pretty amusing. I removed all four jumpers and:</p><p></p><ul style="text-align: left;"><li>68000 D0..D15 are OK</li><li>68000 A1..A15 are OK</li><li>68000 A16, A17 - not OK!</li><li>68000 A18 - OK!</li></ul><div>The A18 line made it to the ROM board via one of the wires soldered to the write-once RAM board. The ROM /CS line was soldered to the write-once RAM board as well.</div><p></p><p></p><div>Then I went digging on the ROM board. Let's use ROM numbering now, starting at A0 (cause that's how my notes went.) A0 to A8, A9, A10, A11, A13 used the "even" ROM address lines. A15 used pin 1 on the odd side. A16 on the kickstart ROM mapped to /CS2 on the odd side. A17 on the kickstart ROM mapped to the 4 pin connector and over to the write-once memory board. Same with the ROM /CS line.</div><div><br /></div><div>So, I had some culprits.</div><div><ul style="text-align: left;"><li>/CS2 maps to ROM A16 which is Amiga/68000 A17. Ok, so maybe I can play with that on the Amiga side using W4, right?</li><li>Where the heck was Amiga/68000 A16 being routed?</li><li>ROM A15 on odd pin 1 should be controlled by W2, either being Amiga/68000 A16, or +5v, right?</li></ul></div><div>Ok, so then I started buzzing the jumpers and finding out where they went. I then made my first discovery - the trace to ROM /CS2 ? It was tied to CPU A16. No matter what. So, I couldn't flip W4 to the alternate configuration - that <u>shorted ROM /CS2 and CPU A16 to CPU A17</u>. Which means I could not use the /CS2 pin on the ROM adapter, I had to run a separate wire to connect it to CPU A17 and have it end up on the right ROM pin!</div><div><br /></div><div>Ok, so. I did that. I routed ROM A16 to the middle pin of W4 and ROM A17 to the right hand pin of W4. The rest of the jumpers mirrored the original configuration of the Amiga 1000.</div><div><br /></div><div>.. but then, nothing. Ok. I went looking at what else could be missing. Then I found the fun reason -<u> the kickstart adapter PCB didn't at all hook up the /BYTE control line to anything. </u>It was just floating. This is problematic for things like DiagROM or the flash based ROM replacements which expect /BYTE to be set correctly for word access. So, I soldered a wire to +5v so it would be tied high and enable word mode.</div><div><br /></div><div>Success! The ROM booted to a green screen! Ew.</div><div><br /></div><div>So, in went the <a href="https://www.diagrom.com/" target="_blank">Amiga DiagROM</a>. And DiagROM booted! And gave me a lovely screen of horizontal bars! Now, they're supposed to hint at which data line could be busted, but they were all light green and I was told by the author that it may also be not finding enough chip RAM. He suggested a 5V UART directly attached to the UART TX pin on Paula, and that's what I did.</div><div><br /></div><div>And he was right - it was only detecting 64k of chip RAM.</div><div><br /></div><div>I was very confused. I slept on it. The next day I fired up the DiagROM again but with some fast RAM attached, so DiagROM would actually start all the way. Then I used the memory editor to edit regions of chip RAM to see how it behaved. The RAM behaved .. fine? Until I looked a bit closer.</div><div><br /></div><div>The first 64KiB of chip RAM was mirrored in the second.</div><div><br /></div><div>The third 64KiB of chip RAM was mirrored in the fourth.</div><div><br /></div><div>etc.</div><div><br /></div><div>That told me A16 was stuck. But, it couldn't be the whole of A16, or the ROM code wouldn't get very far. No, it was something to do with RAM. Or, to be clear, the address decoding of chip RAM. I had a late night idea that day- what if the bit wasn't stuck, but it .. wasn't being routed?</div><div><br /></div><div>So I buzzed the chip RAM address bus, here:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE2NxhN9p1JmVr9-XJcILgn2IKYSdJ9JYo0GWT_3bUEsVxzpOpDDza5PjPYqm4QjGU7QIvq2qLb3k_V9jIaQhrzpyGeAr6t4CqWteXeAi1L7qg43j_txk7Aj7FtADOCCQ0dRoJc2FgFWomjqCH8ByByJc3pVJGwwRGp9rBwsxfz6yk9FA0C4Mc-q87ZA/s722/Screen%20Shot%202022-09-25%20at%207.39.01%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="722" data-original-width="494" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE2NxhN9p1JmVr9-XJcILgn2IKYSdJ9JYo0GWT_3bUEsVxzpOpDDza5PjPYqm4QjGU7QIvq2qLb3k_V9jIaQhrzpyGeAr6t4CqWteXeAi1L7qg43j_txk7Aj7FtADOCCQ0dRoJc2FgFWomjqCH8ByByJc3pVJGwwRGp9rBwsxfz6yk9FA0C4Mc-q87ZA/s320/Screen%20Shot%202022-09-25%20at%207.39.01%20PM.png" width="219" /></a></div><br /><div><br /></div><div>These go up to the write-once memory board, so I buzzed A16 on pin 10 of that chip and ... bam. Nothing. No connection to CPU A16.</div><div><br /></div><div>Then I buzzed the jumpers. And I found the last thing that super surprised me.</div><div><br /></div><div>The left hand side of W4, that was connected to the CPU A16 and /CS2 line? That pin goes to the RAM A16 line.</div><div><br /></div><div>And so does the W2 jumper. The left hand side of W2 is RAM A16. The middle is ROM A16. The right is +5v.</div><div><br /></div><div>So, the PCB routing seems hella wrong there.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPNjefSXUbgjqeubJRd2SB2576ShLHekorMqmYybkSC3Y0WDfgNAyIXbRmcHrAyA8UTgTld2VsPLPca3VNGthHYwvzpomxL8rRORSoyXvr5IPbcrKS-m48pPDf3i47IQIXs4WsBRkXqT6rUU7e0iaT0LANIUdDTLz1Dp_qE1Mjk4FbCXdoCeDP3nnK1A/s1174/Screen%20Shot%202022-09-25%20at%207.11.46%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1174" data-original-width="1018" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPNjefSXUbgjqeubJRd2SB2576ShLHekorMqmYybkSC3Y0WDfgNAyIXbRmcHrAyA8UTgTld2VsPLPca3VNGthHYwvzpomxL8rRORSoyXvr5IPbcrKS-m48pPDf3i47IQIXs4WsBRkXqT6rUU7e0iaT0LANIUdDTLz1Dp_qE1Mjk4FbCXdoCeDP3nnK1A/s320/Screen%20Shot%202022-09-25%20at%207.11.46%20PM.png" width="277" /></a></div><br /><div>So, after removing two pins from my adapter, routing /CS and A17 directly out as wires for A16 and A17, and hooking them up as shown, DiagROM started and all chip RAM was found. When I flipped out the Diag ROM for a Kickstart 1.3 ROM, it also worked fine.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2IlxeeLDv5UX8OsbmbkPYSqMzHyN4tjoLrcHaWILXuOVwfaBlGGxO4F_ZEfuL-Dh2nbjKz6C21sBs-dF5YF8vNzOxLTSskNlBWDNm1l6ZYDiAPn39_HZpXCpZzG9NxqlCPt25XqjFc-wDvBPKeIl7tFJKqy-av_whl6rWjiaUcaxJY1zOthrK44rclQ/s1400/Screen%20Shot%202022-09-25%20at%207.11.28%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1296" data-original-width="1400" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2IlxeeLDv5UX8OsbmbkPYSqMzHyN4tjoLrcHaWILXuOVwfaBlGGxO4F_ZEfuL-Dh2nbjKz6C21sBs-dF5YF8vNzOxLTSskNlBWDNm1l6ZYDiAPn39_HZpXCpZzG9NxqlCPt25XqjFc-wDvBPKeIl7tFJKqy-av_whl6rWjiaUcaxJY1zOthrK44rclQ/s320/Screen%20Shot%202022-09-25%20at%207.11.28%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBBvOgcdDZQ2J7BqZsWaWRvP8qVgYaFM2iWcLx7DAxOpMsn9xDkjxFdJpgHGXLXdZ3ySn0JeoiGgvqhjyaxtb3JVBE3_WgsHZ5snmzyDwgxYowmy1q00_8QEJMJEAOANmRSrx3G7Yi_ut3BMvUWvG3WGdpuEGeoERYIroiOOesEXx8SULgDLrjNhccWA/s1000/Screen%20Shot%202022-09-25%20at%207.11.39%20PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="910" data-original-width="1000" height="291" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBBvOgcdDZQ2J7BqZsWaWRvP8qVgYaFM2iWcLx7DAxOpMsn9xDkjxFdJpgHGXLXdZ3ySn0JeoiGgvqhjyaxtb3JVBE3_WgsHZ5snmzyDwgxYowmy1q00_8QEJMJEAOANmRSrx3G7Yi_ut3BMvUWvG3WGdpuEGeoERYIroiOOesEXx8SULgDLrjNhccWA/s320/Screen%20Shot%202022-09-25%20at%207.11.39%20PM.png" width="320" /></a></div><br /><div>As you can see, the jumper positions are basically where they were for an unmodified board, except that I'm manually grabbing the Amiga/68000 A16/A17 lines and running them to the ROM adapter (and those pins are removed from both odd/even connectors!)</div><div><br /></div><div>Well, that was fun. "Fun". I have a second Amiga 1000 here, I may choose a different path for its upgrades.</div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-75132513529871467822022-07-11T18:10:00.001-07:002022-07-11T18:10:03.588-07:00Fixing a third commodore plus/4, or "god damnit adrian stop it"<p>Here's a fun and easy one to fix.</p><p>One commodore plus/4. Here's what it displayed.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUMSdpI8MT6fHnriKmLaa3Bmf10dSd71CBeGTUGa1QY0ZipuxxWM9yxHm9BQV8En18WnxS8gMlrptGmhbgGQ1V0pe3oTQVwec69_3sV0txFPl5lFRM6CvCOTViLiKEO3fxVrOvQ1RlJUx95xKHnTdH5l_W_MMmNAultlPPzQSep0UD4ziLrtCG1x3dMA/s1488/Screen%20Shot%202022-07-11%20at%205.50.46%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1216" data-original-width="1488" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUMSdpI8MT6fHnriKmLaa3Bmf10dSd71CBeGTUGa1QY0ZipuxxWM9yxHm9BQV8En18WnxS8gMlrptGmhbgGQ1V0pe3oTQVwec69_3sV0txFPl5lFRM6CvCOTViLiKEO3fxVrOvQ1RlJUx95xKHnTdH5l_W_MMmNAultlPPzQSep0UD4ziLrtCG1x3dMA/s320/Screen%20Shot%202022-07-11%20at%205.50.46%20PM.png" width="320" /></a></div><br /><p>Looks like the TED chip is outputting something, but it isn't setup right.</p><p>So I pop it open. There's the right clock on pin 1 of the CPU - switching between 1 and 2MHz as it does. Ok, so let's check the ICs.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigc9Klvg74BYdiMFiA7GawRqVsLsk52LOQndnm1pQOmU7lGEdqv2YATExtLLNKxl1kYhRpt80vlstbpWG5Sc7RFIA8HjUNzdq9pd1muIt5PHkAIG2e8LhGjORjGVJy3s0zCLaYOXHVg8baqP-PFuO3hCjqCRHHQBJuxmLM4A9EGQmt9vFth7OwAkB9Ww/s1312/Screen%20Shot%202022-07-11%20at%205.50.59%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1312" data-original-width="1046" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigc9Klvg74BYdiMFiA7GawRqVsLsk52LOQndnm1pQOmU7lGEdqv2YATExtLLNKxl1kYhRpt80vlstbpWG5Sc7RFIA8HjUNzdq9pd1muIt5PHkAIG2e8LhGjORjGVJy3s0zCLaYOXHVg8baqP-PFuO3hCjqCRHHQBJuxmLM4A9EGQmt9vFth7OwAkB9Ww/s320/Screen%20Shot%202022-07-11%20at%205.50.59%20PM.png" width="255" /></a></div><p>Hm, there's something wrong with the CPU pins.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfxFgMA29Imxqu6vpxRRt4nthFSHWTaGtMyk9t7ePp2mH_fX5utqFcap_gGuCsYhxQTrDaZKpm48adgg7e4B55hd4piyekPxGTbg-k7Sj_hXa0KPqDMIQmoJXzmJz78re4u6a4WiRiIYb5SNlwUjVugWxo9di0KwLBGeFBOG1ZOO0ppm3GhYrEjN4Btw/s1300/Screen%20Shot%202022-07-11%20at%205.51.07%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="954" data-original-width="1300" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfxFgMA29Imxqu6vpxRRt4nthFSHWTaGtMyk9t7ePp2mH_fX5utqFcap_gGuCsYhxQTrDaZKpm48adgg7e4B55hd4piyekPxGTbg-k7Sj_hXa0KPqDMIQmoJXzmJz78re4u6a4WiRiIYb5SNlwUjVugWxo9di0KwLBGeFBOG1ZOO0ppm3GhYrEjN4Btw/s320/Screen%20Shot%202022-07-11%20at%205.51.07%20PM.png" width="320" /></a></div><div><br /></div>And this socket ... is kinda busted looking. One whole side of pins just aren't making contact correctly.<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC8yojisonM-wRTA6qTeSgKhBvaPyPc1wx_1LIj78elB_eVsIs8Mn6ICzQ36YKx4why34P9nM_iVGcatIw_ic1wdTMbCHCkQhft5AzkacP3Z9Ci2dBJlQHL-0-xThx3Kk9pyvU929yZVfo_YSMAFfJy9BS3rU1fbVyyT03p_LQBabdtA-FUm8UYnEuLA/s996/Screen%20Shot%202022-07-11%20at%204.02.06%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="996" data-original-width="442" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC8yojisonM-wRTA6qTeSgKhBvaPyPc1wx_1LIj78elB_eVsIs8Mn6ICzQ36YKx4why34P9nM_iVGcatIw_ic1wdTMbCHCkQhft5AzkacP3Z9Ci2dBJlQHL-0-xThx3Kk9pyvU929yZVfo_YSMAFfJy9BS3rU1fbVyyT03p_LQBabdtA-FUm8UYnEuLA/s320/Screen%20Shot%202022-07-11%20at%204.02.06%20PM.png" width="142" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>Anyway. I removed the socket, replaced it with a new one and ... well, that was it!</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJC5uKlTeyFFwr4eCwZiYBEf9QqPrsj7SUpg-hBdulEOBEDfu1KJd3sh9CMrM8FJThjYn06i58y-QlZG75zHDa_OYcv9AAhLFcUihlNnvZkwjcb1UOHFX9GcEEidjrDEjHiDF69mBC_bldwgIOdpZOlfSrdjRIHZH8zeDKsXfPheykZqYwmnyJMgklbA/s1386/Screen%20Shot%202022-07-11%20at%205.51.29%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1028" data-original-width="1386" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJC5uKlTeyFFwr4eCwZiYBEf9QqPrsj7SUpg-hBdulEOBEDfu1KJd3sh9CMrM8FJThjYn06i58y-QlZG75zHDa_OYcv9AAhLFcUihlNnvZkwjcb1UOHFX9GcEEidjrDEjHiDF69mBC_bldwgIOdpZOlfSrdjRIHZH8zeDKsXfPheykZqYwmnyJMgklbA/s320/Screen%20Shot%202022-07-11%20at%205.51.29%20PM.png" width="320" /></a></div><br /><div>The end!<br /><div><br /><div><br /><p><br /></p></div></div></div>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-18378076328589699832022-05-23T12:13:00.001-07:002022-05-23T12:13:07.906-07:00Getting new simgen backdrops on my amiga 500<p>This'll be nice and short.</p><p>I wanted to add some new backgrounds to simgen, which is a hack on Amiga Workbench 1.3 setups which allows for a 1 or 2 bpp (2 or 4 colour) background image.</p><div style="text-align: left;">Part of it is figuring out how to convert to a suitably formatted IFF (interchange file format) for an Amiga. I didn't want to install photoshop or do photo conversion on the Amiga. Yeah I'm lazy.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">So the TL;DR is:</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><ul style="text-align: left;"><li><a href="https://github.com/Pixinn/rgb2amiga" rel="nofollow" target="_blank">https://github.com/Pixinn/rgb2amiga </a>- rgb2amiga converts images to IFF using Imagemagick 6. Yes, make sure you install ImageMagick 6 as the latest version API has changed enough for this to fail compilation.</li><li>Make sure you resize the original image to a suitable resolution for your desktop - I'm using 640x200, and I'll play with 640x256 later.</li><li>Make sure you also realise the output screen is 4:3, so crop appropriately.</li><li>Run the program, and see what happens.</li></ul><div>Here's the input and output images:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcF_7l7HVPWkNqJa-0CqCxnJIPcYeAV0JTAk0Tuj_rtUzTHTwYU5Ifo6S5Ul7q2rXXuv4yXHu_8tBvTcs9filirAL9t_Y1OL_56BR8qtPp2Eu9ImmoiaTc9X2Vld9Li27eLNsxrwqa4Zzx6ojbQdf6rxpaAKoucHU-ySwaTyO1r2pSson-tiJorshYHA/s1560/04082022_cortana02_134721.webp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="878" data-original-width="1560" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcF_7l7HVPWkNqJa-0CqCxnJIPcYeAV0JTAk0Tuj_rtUzTHTwYU5Ifo6S5Ul7q2rXXuv4yXHu_8tBvTcs9filirAL9t_Y1OL_56BR8qtPp2Eu9ImmoiaTc9X2Vld9Li27eLNsxrwqa4Zzx6ojbQdf6rxpaAKoucHU-ySwaTyO1r2pSson-tiJorshYHA/s320/04082022_cortana02_134721.webp" width="320" /></a></div><div style="text-align: left;"><br /></div><br /><div><br /></div></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6hQ5h_ACK1rYPIvoumFMCMJnoUZA-TiOicvOai8b1wQpGwnaQmpTHdYRTJnax_j8_If4nZbyMYwLth6cB1a9hxxMDls6qOA0EQuO8MGyI1fwzDtGhkic3a5FW1-YWMgX0bAFryc-iZRBGwHIfEWDwqpZ6MY5P53y5inFH9AZrjhciqBqPxCCSW8h_fw/s4032/PXL_20220522_050607588.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6hQ5h_ACK1rYPIvoumFMCMJnoUZA-TiOicvOai8b1wQpGwnaQmpTHdYRTJnax_j8_If4nZbyMYwLth6cB1a9hxxMDls6qOA0EQuO8MGyI1fwzDtGhkic3a5FW1-YWMgX0bAFryc-iZRBGwHIfEWDwqpZ6MY5P53y5inFH9AZrjhciqBqPxCCSW8h_fw/s320/PXL_20220522_050607588.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Yes I know I didn't crop it to the right aspect ratio; I just wanted to see if it worked before I spun cycles on optimising things.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><br />Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-19615869077987972832022-05-19T15:26:00.002-07:002022-05-19T15:26:08.618-07:00It took me WAY too long to get this gotek to work...<p> The short version - when you buy an actual OG Gotek with the OG Gotek firmware, it doesn't work in any convenient way that is documented on any of the retro computing sites, because you DEFINITELY need to flash it with different firmware.</p><p>Ok, so the less short version!</p><p>I picked up a busted Amiga 500 for free to help repair an Amstrad CPC464 for someone. It had a busted ROM socket, busted RAM and some other random crap that I needed to fix. Oh and 50 of the keys were not working, and the key membrane was broken!</p><p>So everything above is fixed - and I still need to fix the RTC in the A501 memory expansion - but now I need to get it to boot. And I don't have a spare floppy drive for this.</p><p>But I did have a Gotek - I bought it for the IBM PC stuff, but I ended up bootstrapping it using USB 3.5 inch floppy drives.</p><p>.. and it didn't work. And I didn't understand why.</p><p>So, the summary.</p><p>I wanted to flash the FlashFloppy Gotek stuff from <a href="https://github.com/keirf/flashfloppy/wiki/Firmware-Programming">https://github.com/keirf/flashfloppy/wiki/Firmware-Programming</a>. Easy peasy. Get a UART hooked up and connect to FreeBSD.</p><p>Didn't work. Welp.</p><p>After reading around I found that someone tried at 9600, because it just wouldn't work faster.</p><p>I did that and well now it does. It's quite possible if I added the 10k pull-ups mentioned on the flashfloppy hardware mods section that I'd have more luck.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ZL0T5-DDxkpSPyG00tmKaFysYABMv5GE92zlF5zeA7_WZGPSU8zRrx3hM4yKrZNScKB7Ah3wFpWS7GObGqBe-vYZMGDJjyndTECQJcRUNXqVZTqwVaJz1JpWSY6mvPREkeXsq8LksSBwuiAK1F3_xuaaZjlPs4gMda5ombbHMc0jlzhr-xEmPKTuyQ/s4032/PXL_20220519_195016393.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8ZL0T5-DDxkpSPyG00tmKaFysYABMv5GE92zlF5zeA7_WZGPSU8zRrx3hM4yKrZNScKB7Ah3wFpWS7GObGqBe-vYZMGDJjyndTECQJcRUNXqVZTqwVaJz1JpWSY6mvPREkeXsq8LksSBwuiAK1F3_xuaaZjlPs4gMda5ombbHMc0jlzhr-xEmPKTuyQ/s320/PXL_20220519_195016393.jpg" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmhrndNx2MEEV6oVpn17L81A8T4cEc8GPDch6rm1W9cQaEdgXh1ptUtiahYCy0TgmlpNox-0ski6r0BN7JiQCiYGWiU1eRVwXz9sMgCnesW9u6PnwubYaOmEQegd_x4O7yFSAM6FRKoOJEc-rpYR__GfYgrPm1xbQ72zyAOPx_gFWSw9wO4-p1faCwXA/s4032/PXL_20220519_200712519.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmhrndNx2MEEV6oVpn17L81A8T4cEc8GPDch6rm1W9cQaEdgXh1ptUtiahYCy0TgmlpNox-0ski6r0BN7JiQCiYGWiU1eRVwXz9sMgCnesW9u6PnwubYaOmEQegd_x4O7yFSAM6FRKoOJEc-rpYR__GfYgrPm1xbQ72zyAOPx_gFWSw9wO4-p1faCwXA/s320/PXL_20220519_200712519.jpg" width="320" /></a></div><div><br /></div>.. and flashing it from FreeBSD:<div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0P9hAM2ACT8brXNgLjoiQBfLM-I4fBNBx3vN37rCJdJe4cB6OIy6xgH6PbuwGp61orvjSDUYQum9Bo0oMbw3FlcEZjtaYfgJR8qoWup7LRKAcwuIZV-nhdl6X-on4XWRWV1UJ3Ih6WT-LTHID3YGf7vlAHV85XpbZqd4N-QLngcwLlZ0dqMUi9XrNA/s4032/PXL_20220519_195019005.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0P9hAM2ACT8brXNgLjoiQBfLM-I4fBNBx3vN37rCJdJe4cB6OIy6xgH6PbuwGp61orvjSDUYQum9Bo0oMbw3FlcEZjtaYfgJR8qoWup7LRKAcwuIZV-nhdl6X-on4XWRWV1UJ3Ih6WT-LTHID3YGf7vlAHV85XpbZqd4N-QLngcwLlZ0dqMUi9XrNA/s320/PXL_20220519_195019005.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Easy.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Ok, next. Hooking it up. Set it to be device 0, remove another config jumper. Easy. Also, apparently the pinout is .. reversed on the amiga 500? In any case, pay super close attention to the orientation of the floppy drive connectors.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNzAjR9ROj798aWp6CqR47hEzd7ZiLGKvmXQzYkU6hgpE6pe2VZrwR5FCPWBHy1-S8e0qA8IsGFXsJa6W46HjB_b-vZ4jKupklInk8sS00-damNcZzDWAp9j9J-t3fYF1btWCeAWFQIsML97s3VbOgc9tzIQVAWIWRT_cfBBU_wfdJQ_MYBm1YaF7xbQ/s4032/PXL_20220519_222211762.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNzAjR9ROj798aWp6CqR47hEzd7ZiLGKvmXQzYkU6hgpE6pe2VZrwR5FCPWBHy1-S8e0qA8IsGFXsJa6W46HjB_b-vZ4jKupklInk8sS00-damNcZzDWAp9j9J-t3fYF1btWCeAWFQIsML97s3VbOgc9tzIQVAWIWRT_cfBBU_wfdJQ_MYBm1YaF7xbQ/s320/PXL_20220519_222211762.jpg" width="320" /></a></div><br /><p>Anyway. Now it works. I then followed the installation instructions for a USB stick and whacked Workbench 1.3 images on - and now it boots fine into workbench 1.3. I've ordered a replacement mounting frame for the Gotek board so it can sit in with the case closed - but for now the machine works.</p><p>Well, besides the RTC. That's next. Ugh.</p></div>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-39407771887530336472022-05-14T18:29:00.003-07:002022-05-14T18:29:14.094-07:00Amiga 1200 - Kickstart 3.1.4 upgrade, but not upgrading to AmigaOS 3.1<p> So I splurged a couple bucks on the updated AmigaOS 3.1.4 from Hyperion. It came with both the ROMs and AmigaOS. Now, I have 3.1 installed already, and I wanted to just drop in the ROMs.</p><p>It almost worked.</p><p>It looks like they moved some libraries from the ROM out to disk/RAM in order to make space.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEAzkA6UEHtJqeeZ9yyn-NOqd52dB74DtZ7yuWeS-1ZTF1r2mIBE3UackJuXNxLnG3HNXWU9iemWYtnwvMuh73CTXLUfJHGlKBhMnEa59Ov8PYhDfMpRMADXrja3wjA6f_W5rWzbE9r-m47bTSC57S58THfISzw3jijUdMgePkyBCNOs3zkFhPyatiAg/s628/Screen%20Shot%202022-05-14%20at%206.24.15%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="296" data-original-width="628" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEAzkA6UEHtJqeeZ9yyn-NOqd52dB74DtZ7yuWeS-1ZTF1r2mIBE3UackJuXNxLnG3HNXWU9iemWYtnwvMuh73CTXLUfJHGlKBhMnEa59Ov8PYhDfMpRMADXrja3wjA6f_W5rWzbE9r-m47bTSC57S58THfISzw3jijUdMgePkyBCNOs3zkFhPyatiAg/s320/Screen%20Shot%202022-05-14%20at%206.24.15%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ-FJ68PK3F2fw1Hf9ojH-cMXBvX0Qlj_oFg14nlJu2NySLzPPrzw_9-dtLUWeBgu-A8ce8_BrGHYis-S0u4MSihOBKLR383jjW-fkSyxB6ihW4_z8-1Fz3Fhj8W6C6F1Hvx28sJ26ikDZwj3EohJPQkrpp5biboLrfNKytNBYDBAfr_0pGZV47nQ0A/s558/Screen%20Shot%202022-05-14%20at%206.23.54%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="322" data-original-width="558" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ-FJ68PK3F2fw1Hf9ojH-cMXBvX0Qlj_oFg14nlJu2NySLzPPrzw_9-dtLUWeBgu-A8ce8_BrGHYis-S0u4MSihOBKLR383jjW-fkSyxB6ihW4_z8-1Fz3Fhj8W6C6F1Hvx28sJ26ikDZwj3EohJPQkrpp5biboLrfNKytNBYDBAfr_0pGZV47nQ0A/s320/Screen%20Shot%202022-05-14%20at%206.23.54%20PM.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">So I figured they were on one of the installation disks, and....</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjKp0SAuEaS2JG1Y2TX_SCZ8VSzFh2uAWWmqnvz07v3IPI_u8khblMBGERO1zkyPq8ExHGZ4Fu5vRbhg00-bAoOXYXUfw-hUB81HJUMeH-8quUGcvNUCth7UxTkleY7d37s_y4LBoHywG2Iy4outuqQAzup7Y4mho238BS-RvGaK6uQw3RxdqSBAhOgQ/s1092/Screen%20Shot%202022-05-14%20at%206.24.07%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="844" data-original-width="1092" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjKp0SAuEaS2JG1Y2TX_SCZ8VSzFh2uAWWmqnvz07v3IPI_u8khblMBGERO1zkyPq8ExHGZ4Fu5vRbhg00-bAoOXYXUfw-hUB81HJUMeH-8quUGcvNUCth7UxTkleY7d37s_y4LBoHywG2Iy4outuqQAzup7Y4mho238BS-RvGaK6uQw3RxdqSBAhOgQ/s320/Screen%20Shot%202022-05-14%20at%206.24.07%20PM.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">Easy peasy. I copied icons.library and workbench.library to my system partition and rebooted. All good!</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh90p0mo1N_LSk_2X6O2YByQ3g9B-edwoTTnrCqAt-SjrJxMHk0hg2IinDiiOIFdOXO_YzMWCdyYwRotbNUJ5gwt_9vS1vYcuxej1X79EtKqVpUE_Bo_SfTuUr9RVMJTpvXYobPxCzk8EkZ0CjCtbCi3imaMxqRnuIOVUD6LOw3v5muAOPpE_OptlzT1A/s568/Screen%20Shot%202022-05-14%20at%206.24.00%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="414" data-original-width="568" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh90p0mo1N_LSk_2X6O2YByQ3g9B-edwoTTnrCqAt-SjrJxMHk0hg2IinDiiOIFdOXO_YzMWCdyYwRotbNUJ5gwt_9vS1vYcuxej1X79EtKqVpUE_Bo_SfTuUr9RVMJTpvXYobPxCzk8EkZ0CjCtbCi3imaMxqRnuIOVUD6LOw3v5muAOPpE_OptlzT1A/s320/Screen%20Shot%202022-05-14%20at%206.24.00%20PM.png" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">It's really quite slick how Kickstart ROMs are basically a bootloader and then a whole bunch of libraries, some of which form the core OS and some are actually just libraries. I'm sad this concept didn't show up elsewhere.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><br /><p><br /></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-32449630715638697212022-02-07T11:08:00.005-08:002022-02-07T11:08:34.081-08:00At least cross compiling for the Amiga 500 is easier than the 16 bit DOS mode PC stuff<p>I wanted to hack on Amigaterm (<a href="https://aminet.net/package/comm/term/amigaterm">https://aminet.net/package/comm/term/amigaterm</a>) a bit, but I found out that someone already had done that (<a href="https://aminet.net/package/comm/term/amigaterm_enh">https://aminet.net/package/comm/term/amigaterm_enh</a>). They fixed some bugs and added speeds above 9600 baud - 19200 works fine on the Amiga 500, and 38400 works fine on the Amiga 1200.</p><p>But I wanted to add a couple more things - play with what Amiga calls "serial hardware flow control" (which is .. not quite what you expect...) and fix up xmodem receive to allow it to truncate data at a particular file size. Without the truncation option the written file is a multiple of the xmodem block size (128 bytes) which results in binaries you can't actually run.</p><p>Anyway.</p><p>There's a very nicely put together build framework targeting m68k Amiga at <a href="https://github.com/bebbo/amiga-gcc">https://github.com/bebbo/amiga-gcc</a> . I haven't built it yet on FreeBSD - just Ubuntu Linux and MacOS/X. Then I wanted to get amigaterm to compile for workbench 1.3 as that's what is on my Amiga 500. It turns out that's quite easy - you just need to use the right command line option (-mcrt=nix13), but you need to be sure that you're not trying to use library versions and functions that are later than what 1.3 supports.</p><p>This did trip me up - there's a ChangeFileSize() in later OS versions (4.0 I think?) that isn't in 1.3, but there is SetFileSize() in 1.3 (library version 36). I ended up opting for just not writing out the data instead of writing it out and truncating.</p><p>Now that this is working I think I'll go and see if using 128 byte receive data buffers when receiving xmodem packets works better than byte at a time. I need to go and understand how they handled timeouts so I don't end up waiting forever for data to show up. That may end up speeding up receive transfers a little.</p><p>What I'd really like to do is bring over or write very small zmodem receive library to really speed things up to make it less painful to transfer the 880 kilobyte disk images (ADF). That'll make bootstrapping things less painful in the future.</p><p>Next up is fixobj. The source for that is on the fish-010 disk so I modified it to compile here. It's hard-coded to search the last 128 bytes for the end of an executable binary, which matches the normal 128 byte xmodem block size.</p><p>Finally, I've put them both in github here - <a href="https://github.com/erikarn/amiga-code">https://github.com/erikarn/amiga-code</a> .</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-13455109956175838502022-02-05T19:33:00.005-08:002022-02-05T19:33:57.719-08:00Getting stuff onto the Amiga 500, or "holy crap please include bootstrapping serial file transfer utilities in your OS"<p>Yes, I know I'm ranting about 1980s OSes, but to be quite frank, modern OSes on a variety of hardware still have a similar problem.</p><p>Wait, what do I mean you ask? Surely you will always have ethernet/wifi/USB available? I almost started writing a bit on that here given I end up working behind the scenes on modern hardware and a LOT has to be working before you can talk over the network or, heck, even boot your device. But I'll leave that for another day.</p><p>This is a similar thing to what I found in a <a href="https://adrianchadd.blogspot.com/2020/12/repairing-and-bootstrapping-ibm-5170_17.html" target="_blank">previous blog post</a> about boot-strapping an old PC/AT before I had useful media (read: disks and other working machines.) It's doubly tricky for the Amiga because of it's non-standard floppy disk format that can't be easily read on PCs, let alone written to. You need to have another Amiga, or some modern multi-format disk interface like the <a href="https://en.wikipedia.org/wiki/Individual_Computers_Catweasel" target="_blank">Catweasel</a>. I lucked out and at least got working Workbench 1.3 Main and Extra disks with the Amiga 1000 I picked up - but no working Kickstart disk, hence why I'm working with the Amiga 500 right now.</p><p>Anyway, the goal of this is to get the following to work:</p><p></p><ul style="text-align: left;"><li>Figure out how to transfer a simple program to get a single binary over in a useful way;</li><li>Transfer a small enough program over to do xmodem/ymodem/zmodem;</li><li>Use that to bootstrap the tools to write disk image files to an Amiga 880K disk; and</li><li>Also write out a working Kickstart 1.3 disk for my Amiga 1000.</li></ul><div>This is... surprisingly annoying to do.</div><div><br /></div><div>Firstly, how to get the initial files over. Workbench didn't come with a file transfer program, even with AmigaDOS. xmodem was around in the late 70s so it could've been used. Oh well. Luckily the Extras disk includes AmigaBASIC which can speak to both the disk and the serial port. And there are guides out there for how to write a simple non-error-checking binary receive program - I used <a href="http://www.boomerangsworld.de/cms/vc/amiga_transfer.html" target="_blank">this one</a>.</div><div><br /></div><div>I also needed to make a null modem cable up. Now, the Amiga 500/1000 used some of the RS-232 port pins for things other than ground, so it's best you make one of your own. Here's what I used for my Amiga 500.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgUhAWQ84i5_AgchMRYmiZURMnssZStagIMTAJBvGVrMJwZQAEOg1qabZpf5yZouFGV-l4o33V-O0R8oJQuxKslwLb1IZmOEExoLpgFC62SvXAde-DfmIFE37K7duMloZsKDA7neBxOyr8V9Qg7RPLnhJ6RAdpkzw82LWUVRP4t9xkfjSb9SperYklkow=s1844" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1140" data-original-width="1844" height="249" src="https://blogger.googleusercontent.com/img/a/AVvXsEgUhAWQ84i5_AgchMRYmiZURMnssZStagIMTAJBvGVrMJwZQAEOg1qabZpf5yZouFGV-l4o33V-O0R8oJQuxKslwLb1IZmOEExoLpgFC62SvXAde-DfmIFE37K7duMloZsKDA7neBxOyr8V9Qg7RPLnhJ6RAdpkzw82LWUVRP4t9xkfjSb9SperYklkow=w402-h249" width="402" /></a></div><br /><div><br /></div><div>The Amiga 1000 uses a reversed serial port, and I will figure out that particular hilarity once I get it booting with Kickstart.</div><div><br /></div><div>However! Not everything was, err, well documented. I remember Amiga stuff in the 90s, but not THAT well.</div><div><br /></div><div>First up - the receive.bas program in the above link doesn't at all set the serial parameters. So before you start it you need to run the Serial preferences program and configure it up. It also assumes that you're using 1024 byte buffers, so you need to do the following:</div><div><ul style="text-align: left;"><li>Set the speed - I used 9600, it's somewhat reliable here;</li><li>8/N/1, which is already setup;</li><li>Buffer size 1024 bytes, not 512 bytes;</li><li>Hardware flow control!</li></ul><div>Then yes, on the linux side I did the same (<span style="background-color: white; font-style: italic;">stty 9600 -parenb cs8 crtscts -ixon -ixoff raw iutf8 -F /dev/ttyUSB0).</span></div><div><span style="background-color: white; font-style: italic;"><br /></span></div><div><span style="background-color: white;">Ok, then running the program. It's best you get the data going into the ram disk, so set your file target as RAM:filename. Easy.</span></div><div><span style="background-color: white;"><br />Except the block size thing. Apparently with the way AmigaBasic speaks to the serial driver the transfers have to be in block sized blocks, not just the file size. So you need to pad the file you're sending. The receive.bas program will write out the correct length for you.</span></div><div><br /></div><div><span style="background-color: white;">I did something like this:</span></div><div><span style="background-color: white;"><br /></span></div><div><ul style="text-align: left;"><li><span style="background-color: white;">dd if=file bs=1024 conv=sync > /dev/ttyUSB0</span></li></ul><div>That padded it correctly and .. well, after a few attempts I can get a ~ 20k binary to transfer OK.</div></div><div><br /></div><div>Then comes the fun part, what to transfer. I started by transferring lharc. However, apparently the later versions don't work with Workbench 1.3! I had to use <a href="https://aminet.net/package/util/arc/LhA_e138">https://aminet.net/package/util/arc/LhA_e138</a> .</div><div><br /></div><div>It took a few goes, but yes, I got a working lharc tool on the floppy disk.</div><div><br /></div><div>Next up is transferring something less terrible to transfer files with. A lot of things are lha'ed, which is why I spent a lot of time trying to get lha to transfer. Next time I won't, I'll unpack them on the linux sending host and send the binaries.</div><div><br /></div><div>I needed a small transfer program to work on Workbench 1.3. I found <a href="https://aminet.net/package/comm/term/amigaterm">https://aminet.net/package/comm/term/amigaterm</a> . It's small, it runs on Workbench 1.3 and it has xmodem support. Nice!</div><div><br /></div><div>However! It's xmodem support doesn't ask for the receive file size, so it rounds it up to the nearest block size. No! Things like lha then don't seem to work right and binaries certainly don't run.</div><div><br /></div><div>Ok, so how'd they do it in the 80s/90s? It turns out there's a little utility called "fixobj" which tries to find the actual end of a binary object inside a file and truncates it there. I unpacked <a href="https://aminet.net/package/misc/fish/fish-0010">https://aminet.net/package/misc/fish/fish-0010</a> and grabbed the small binary from it. Now I can transfer individual programs, like <a href="https://aminet.net/package/disk/misc/adf2disk11">https://aminet.net/package/disk/misc/adf2disk11</a>, to write out an ADF image to disk.</div><div><br /></div><div>So, that's transferring right now upstairs via xmodem at 9600. Yeah it'll take a while. Luckily <span style="background-color: white;">901120 bytes (the size of an ADF image) </span>is exactly 7040 blocks of 128 bytes each, which is what xmodem is using. Thus I should be OK without having to truncate stuff.</div></div><div><br /></div><div>Once that's done I can start transferring things to get the IDE disk add-on I have here booting, and I can setup the rest of this Amiga 500 to do fun things.</div><div><br /></div><div>What I think would've made this easier?</div><div><ul style="text-align: left;"><li>Some tiny xmodem program that can be transferred over serial relatively quickly, and can receive exact file sizes (ie it'll truncate the last block if needs be)</li><li>A program to actually truncate a file at a given offset so you can use amigaterm as-is to transfer files slowly but reliably, and then just manually truncate it to where it needs to be in order to use it.</li><li>... and then some less tiny but working zmodem program that'll work with Workbench 1.3 to get files on and off the thing.</li></ul><div>In any case I'm hoping by tonight I'll have this thing writing out ADF disk images OK albeit slowly, and I'll see if I can get zmodem working on something faster like 19200 baud.</div></div><p></p><div><span style="-webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Times; font-size: medium; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span></div>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com1tag:blogger.com,1999:blog-4361733293216582854.post-82190979953558653562022-02-01T13:39:00.004-08:002022-02-01T14:41:20.372-08:00Hacking up an Amiga 500 for 1MB chip RAM and 512k slow RAM<p> In a <a href="https://adrianchadd.blogspot.com/2022/01/figuring-out-how-amiga-500-ram.html" target="_blank">previous post</a> I dumped a bunch of information I had learnt about what had happened in open source Amiga hackery. I've now gone and committed the initial hacks needed to prove that it works and document how I did it.</p><p>My goals here were:</p><p></p><ul style="text-align: left;"><li>Build one of the memory expansion Gary adapters that are out there - I chose the PeteAU design that <a href="https://github.com/erikarn/amiga-pcbs/tree/master/amiga-500-ram" target="_blank">I've checked in here</a>;</li><li>Figure out how to modify a rev6 amiga 500 board so I can put 1MB of chip RAM in the provided sockets there (with the <a href="https://www.amigawiki.org/dnl/schematics/A500_R6.pdf" target="_blank">schematic available here</a>);</li><li>Make it so a normal A501 512K RAM + RTC add-on can be plugged in to provide the 512k of slow RAM.</li></ul><div>First up, it worked. Here's how dirty it is.</div><div><br /></div><br /><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiFwR64XgKTJfFvfi2fRk_sA3DvoIZY2HH9URR5zMeOv1kbSdbqWJhO2FYwtsysOCdLh41AgCactixqJ4goMYBpJ1Y5hKWm-4Qt8xfoc3gc0cMur7VS-K-aUxK_2SIcNovNjGIlzEBX7kE7_Pujocfr2oMhCeKhuCSWgFfniI_l0SlLdTpzzT1E9np1Eg=s4032" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="373" src="https://blogger.googleusercontent.com/img/a/AVvXsEiFwR64XgKTJfFvfi2fRk_sA3DvoIZY2HH9URR5zMeOv1kbSdbqWJhO2FYwtsysOCdLh41AgCactixqJ4goMYBpJ1Y5hKWm-4Qt8xfoc3gc0cMur7VS-K-aUxK_2SIcNovNjGIlzEBX7kE7_Pujocfr2oMhCeKhuCSWgFfniI_l0SlLdTpzzT1E9np1Eg=w497-h373" width="497" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">The overview is pretty conceptually easy.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><ul style="text-align: left;"><li>The PeteAU Gary adapter (and I'm sure others!) use the RAS1 line into Agnus and its A19/A23 address line to map RAM into Agnus' other 512k addressable RAM space. The RAM expansions are thus muxed on breaking out CASL and CASU lines whilst enabling RAS1.</li><li>The little break out PCB there is the 74HCT139 dual 2-to-4 demux to decode the two address line bits from the Gary adapter + CASL/CASU lines from Agnus into four CASL/CASU lines.</li><li>The "first" bank from the PeteAU Gary adapter is mapped in as the second half of the 512k chip RAM - and as seen in the picture above, those bent legs are CASL/CASU lines.</li><li>The two tracks that run from U35 out to the trapdoor expansion connector are the CASL/CASU lines to said trapdoor expansion connector. I've cut those and wired them into the second CASL/CASU pair from the 74HCT139 demux.</li><li>No modifications are done on the A501 expansion board.</li></ul><div>I've basically just migrated the 74CHT139 from the PeteAU Gary+RAM expansion adapter board back onto the Amiga 500 rev6 PCB.</div><div><br /></div><div>Here's the relevant bits from the rev6 schematic:</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhu4M9z8TQl82zG_cRpyJbHncDcW1ahi5bRxlpdZpLoci7_UXiKjYOz4a60Zbnnov0U19XT8K8vBpiPUCyykIJRh7RH3yZ4aFHyuS4AqEdxSxj5LFWqHzt7plueRyMZQFVx5hBci5W_Pp_4FRkY0a8Sf8MkPMlwYXWgsVgkYFbuLbav5d8lr5UcNnmnZg=s1030" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1030" data-original-width="908" height="320" src="https://blogger.googleusercontent.com/img/a/AVvXsEhu4M9z8TQl82zG_cRpyJbHncDcW1ahi5bRxlpdZpLoci7_UXiKjYOz4a60Zbnnov0U19XT8K8vBpiPUCyykIJRh7RH3yZ4aFHyuS4AqEdxSxj5LFWqHzt7plueRyMZQFVx5hBci5W_Pp_4FRkY0a8Sf8MkPMlwYXWgsVgkYFbuLbav5d8lr5UcNnmnZg=s320" width="282" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjRJiZ13Ox8fzASvf43xnp6RmgnEbUbYmDd-5xpGzyJ3eqgMM1y-Y4bBU1Uyy3P7xkYvsalyHPlLRdj1-sxbWpwj47o-Vr7HFos8wDlk9R3hAbNtL8H_y6NYAH4RjGq_5QVOm3D5pssmAjnK-vueb4G0UNrhNxKgIf8wCVK0bKdmm9P2lE-WGfhYZom4A=s2050" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="986" data-original-width="2050" height="235" src="https://blogger.googleusercontent.com/img/a/AVvXsEjRJiZ13Ox8fzASvf43xnp6RmgnEbUbYmDd-5xpGzyJ3eqgMM1y-Y4bBU1Uyy3P7xkYvsalyHPlLRdj1-sxbWpwj47o-Vr7HFos8wDlk9R3hAbNtL8H_y6NYAH4RjGq_5QVOm3D5pssmAjnK-vueb4G0UNrhNxKgIf8wCVK0bKdmm9P2lE-WGfhYZom4A=w489-h235" width="489" /></a></div><br /><div>The second bank of 512k chip RAM is U20,U21,U22,U23. It uses RAS1 and the same CASL/CASU that the first bank of 512k chip RAM and the expansion connector.</div><div><br /></div><div>On the rev6 PCB the CASL/CASU tracks route from U35 to both the RAM and the expansion connector. Cutting the tracks going to the expansion connector is fine; they run there and stop.</div><div><br /></div><div>Now, finding useful documentation for what to do.</div><div><br /></div><div>First up, figuring out how to configure the Amiga 500 rev6 PCB.</div><div><br /></div><div><ul style="text-align: left;"><li>J2 (the Agnus A19/A23) jumper was cut so it could be wired into the Gary adapter.</li><li>J7 (the EXP signal from the expansion connector to Gary to say the expansion RAM is there) is left alone, so the A501 can assert it if it's there.</li></ul>I have found a better summary of what to put in the Gary adapter, so here it is.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhZR6gSQTGXz__O4iIczLZSmRuDve6Wqmq3MVepoinN7KSBcKjGYhUvQoVpBC99FurGo-FyNqZ7xmB0IkzkTTmISBRm1QvF5Fio8jG6ndCZ1YNbv96RqydE8TERQU2_0KESWQpAzOyPbedRnwg7-8N6oKvIyaOfMALjBBocxfJ7tppapE2bokvG6BBpTQ=s1322" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="967" data-original-width="1322" height="368" src="https://blogger.googleusercontent.com/img/a/AVvXsEhZR6gSQTGXz__O4iIczLZSmRuDve6Wqmq3MVepoinN7KSBcKjGYhUvQoVpBC99FurGo-FyNqZ7xmB0IkzkTTmISBRm1QvF5Fio8jG6ndCZ1YNbv96RqydE8TERQU2_0KESWQpAzOyPbedRnwg7-8N6oKvIyaOfMALjBBocxfJ7tppapE2bokvG6BBpTQ=w503-h368" width="503" /></a></div><div style="text-align: left;"><br /></div><div style="text-align: left;">And then how I configured my Gary adapter board:</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh_R8xymlNtStgsMcZeL4X6sw1o7Tvv7v-FFF8mcvLic1trWfdSeCej50QImO48dP8vPafc1Hzhdpr-H3L0D0jXefaakGi-BbdQYoiYJZO6nAuT5VnrVu_cb0YXTllph54yeZ3u9DHGMqZoZbsKa5WkeuG8QgAMMx-nua2ZwgXbUHttak0B0rl6Ub8fYg=s4032" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="349" src="https://blogger.googleusercontent.com/img/a/AVvXsEh_R8xymlNtStgsMcZeL4X6sw1o7Tvv7v-FFF8mcvLic1trWfdSeCej50QImO48dP8vPafc1Hzhdpr-H3L0D0jXefaakGi-BbdQYoiYJZO6nAuT5VnrVu_cb0YXTllph54yeZ3u9DHGMqZoZbsKa5WkeuG8QgAMMx-nua2ZwgXbUHttak0B0rl6Ub8fYg=w465-h349" width="465" /></a></div><br /><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div><div style="text-align: left;"><ul style="text-align: left;"><li>JP1 and JP2 set to 2-3 - ie 1M chip</li><li>JP3 set to 1-2 - ie 1.5M slow (decoding all of the space, even if I'm not really decoding stuff from the 74HCT139 to more slow RAM)</li><li>JP4 set to 1-2 (ie, "more slow", so the Gary adapter is properly doing its thing)</li></ul><div>And finally, how it looks when it's all done:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgHCMkidxRYYLCbH4IeMKLz5oA2PD5ZbrPX5mAV9HW1NCva0coOKNUYrT5uKoLMytYc-Sisy_d0uyGz37_cZd5x5XTYTrHD8gKT4bc_bKZC02muoY7zsNlDoA30CfSOShhVi_6dtKyVtDNAnt4iaVDfVwDkf8Q2VwOAT28FvFYrLIYMUgbw_Z6XO8j36Q=s4032" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="329" src="https://blogger.googleusercontent.com/img/a/AVvXsEgHCMkidxRYYLCbH4IeMKLz5oA2PD5ZbrPX5mAV9HW1NCva0coOKNUYrT5uKoLMytYc-Sisy_d0uyGz37_cZd5x5XTYTrHD8gKT4bc_bKZC02muoY7zsNlDoA30CfSOShhVi_6dtKyVtDNAnt4iaVDfVwDkf8Q2VwOAT28FvFYrLIYMUgbw_Z6XO8j36Q=w439-h329" width="439" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgDFxcyZ9LpBUBnM2hHW3oVkZTiwUvPENV9UT-VP9ouvVnLJSa5Y1v0OVr__TsJcfJxLExXx3_SA4YFPAJfW2T1Qq5vCjuqCqp98nRRZYyW6XcQmsJ2iUcSi0I7W74uw_bvt3tvOl71SxmKUW-rQTnS_VOS0YnuO32OTxMyDwCOhfbppApiO5rujd2AzA=s4032" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" height="338" src="https://blogger.googleusercontent.com/img/a/AVvXsEgDFxcyZ9LpBUBnM2hHW3oVkZTiwUvPENV9UT-VP9ouvVnLJSa5Y1v0OVr__TsJcfJxLExXx3_SA4YFPAJfW2T1Qq5vCjuqCqp98nRRZYyW6XcQmsJ2iUcSi0I7W74uw_bvt3tvOl71SxmKUW-rQTnS_VOS0YnuO32OTxMyDwCOhfbppApiO5rujd2AzA=w451-h338" width="451" /></a></div><br /><div style="text-align: left;"><br /></div></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">(Yes, I was playing with the default colours in the second one, I always disliked the orange.)</div><div class="separator" style="clear: both; text-align: left;"><br /></div>If I wanted more RAM then I could easily just piggy back more 41256's on top of the ones I've added and break out the CASL/CASU lines some more, but ... (a) I don't want to, and (b) in that case I'd really just go and build a full 1.5MB slow RAM expansion and undo what I did on the PCB here.<br /><div style="text-align: left;"><br /></div></div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-27808773800913116562022-01-17T08:35:00.005-08:002022-01-18T09:56:57.306-08:00Figuring out how Amiga 500 RAM expansion projects work<p> (Wow, what a shift in topics here..)</p><p>Yeah I picked up an Amiga 500. Specifically, a rev6 amiga 500. It has 4 extra spots on the mainboard for another 512k of chip ram that isn't populated.</p><p>Crap I'm going to have to explain chip RAM.</p><p>Ok, so the Amiga is a pretty nifty architecture, especially if you realise it was designed in the early 80s. I won't go into it all because that's not the point of the article and that's covered on the internet.</p><p>What I will go into is what I've figured out with the RAM expansions.</p><p>So - the RAM types. This is the bits I knew back as a teenager.</p><p>The Amiga has three kinds of RAM:</p><ul style="text-align: left;"><li>Fast RAM is RAM that the CPU can see, but the custom chipsets can't address. It's not slowed down by any contention with the chipset access to its RAM.</li><li>Chip RAM is RAM that the CPU and the custom chipsets can see. This RAM sits /behind/ the custom chipsets; access to it from the CPU is lower priority than from said chipsets.</li><li>Slow RAM is RAM that also sits behind the custom chipsets, but for reasons internal to said chipsets they can't actively use. If the custom chipsets are using chip RAM for functions then the CPU will also be blocked.</li></ul><p>The reason for chip/slow RAM on the early Amigas only makes sense if you peer into <a href="http://theamigamuseum.com/the-hardware/the-ocs-chipset/agnus/" target="_blank">Agnus</a>, the DMA and RAM arbiter chipset. It has a variety of features, but it's basically a big RAM arbiter and DMA engine. The earliest version in the Amiga 1000 supported DMAing to/from 512KB of RAM. However, it supports controlling 1MB of RAM. The next major version update (which I have) supports DMA from and to 1MB of RAM.</p><p>Now, because of this early limitation, the Amiga designers put the first 512k that <a href="http://theamigamuseum.com/the-hardware/the-ocs-chipset/agnus/" target="_blank">Agnus</a> can control early in the memory map (at $000000), and moved that second 512k of RAM much later in the memory map (address $C00000). That way a future chip that supported more DMA accessible RAM would just extend the chip RAM memory map in a contiguous fashion.</p><p>However, this meant a bunch of software was written that assumes the first 512k is at $000000 and the second 512K is at $C00000. Not a lot, but some.<br /></p><p>My goal is to have 1MB of chip RAM and at least 512k of slow RAM. That should give the maximum compatibility with all of the Amiga 500 software in the past and set things up pretty well for the future.</p><p>Now, this is something people have already done. PeteAU on the Amiga Forums <a href="http://eab.abime.net/showthread.php?t=85395&page=1" target="_blank">kickstarted a bunch of designs</a> which were debugged and improved upon by forum members. Let's talk about how it works.</p><p>First up, Agnus decodes a bunch of address lines to know what the CPU is requesting. However, it only treats things as a memory access if Gary, another custom chip, decoded the address bus and said "yup, this is a RAM access." Gary asserts /RAMEN to Agnus to let Agnus know it's a RAM access and Agnus takes care of doing the memory transfer.<br /></p><p>JP2 on the Amiga 500 rev6 board chooses whether Agnus sees the CPU A19 line as A19 or A23. If it's A23, the default, then the second half of Agnus' address bus as viewed by the CPU is at the slow RAM address of $C00000. But if JP2 is cut and the other link is joined, it becomes A19 and both 512KB RAM blocks show up as contiguous RAM at $000000, as chip RAM.</p><p>Agnus decodes its A19 line to select which of two 512KB RAM blocks to enable. It does this using the /RAS0 and /RAS1 lines. /RAS0 enables the onboard 512KB RAM. /RAS1 enables the unpopulated 512KB RAM chips on the mainboard. Also, BOTH /RAS0 and /RAS1 appear at the trapdoor RAM expansion underneath the Amiga 500, and the Amiga 501 512KB RAM expansion uses /RAS1 by default.</p><p>So, you can easily choose between 1MB of chip RAM and a 512KB chip/512KB slow by changing JP2. That's easy.</p><p>JP7 controls whether Gary sees the /EXRAM line from the trapdoor expansion. Gary uses this to control which address ranges are treated as RAM and sent as an enable line to Agnus via /RAMEN.</p><p>JP3 controls which 512KB bank is /RAS0 or /RAS1. It lets you swap them, so the trapdoor RAM and onboard RAM sees /RAS0 as /RAS1 and vice versa. You normally shouldn't have to fiddle with this.</p><p>Finally, Agnus is responsible for managing the DRAM chips. This requires:</p><ul style="text-align: left;"><li>Managing the multiplexed column/row address bus setup that DRAM chips use, so it has to latch rows and then columns for reading</li><li>Asserting the right /RAS and /CAS lines to the right chips (important for normal AND RAM expansion hacks!)</li><li>Handling DRAM refresh. <br /></li></ul><p>Ok, so now that this is done, let's talk about PeteAU's RAM expansion and how they managed to get 1MB of chip RAM and lots of slow RAM.</p><p>There are two halves - the expansion RAM board and the "Gary adapter". The easiest to talk about is the expansion RAM board, so that goes first.</p><p>The RAM expansion boards still take /RAS0 and /RAS1, and provide jumpers to which ends up at which RAM. Ok, so how does it actually enable different RAM banks?</p><p>The two wires that go to the RAM expansion boards are either A19/A20 or some decoded magic that I'll describe later. These feed into a 74LS139 which is a dual 2-to-4 demux. Each demux is responsible - this is important - f<u>or demuxing the /CAS lines</u>. So yes, even if all the expansion RAM is using /RAS1, the /CAS lines get enabled only for the RAM that matters. It's important to understand this particular bit of magic. Agnus only has two /CAS lines - one for the lower 8 bits and one for the upper 8 bits of the 16 bit data bus. So all of the RAM gets /CAS enabled, no matter which 512KB bank it is - then the relevant bank to read gets /RAS. Now with PeteAU's design the /CAS lines for the relevant expansion bank gets enabled.</p><p>Ok, this is where it gets hairy. So, what about if you have 1MB of chip RAM on board, like I do? PeteAU's Gary board apparently takes care of that too.</p><p>One final comment before I move onto the Gary adapter board. Why not go and fiddle with /RAS to enable the right banks? Well, it has to do with DRAM refresh. Agnus also takes care of the refresh cycles which involves asserting only /RAS and enabling each row in the DRAM. If we go and gate which /RAS goes to which chip bank then a bunch of RAM won't get refreshed. You'd then have to add extra logic to see if it's a refresh cycle and manually refresh! Or, you can leave /RAS0 and /RAS1 alone, so DRAM refresh is still OK, and enable RAM using /CAS.</p><p>Right! Now onto the Gary board, where the magic happens.</p><p>A few things have to happen here for all of this magic to be, well, magic.</p><ul style="text-align: left;"><li>If you want to support 1MB chip RAM as well as 512K of slow RAM, you need to be able to decode both the chip RAM and slow RAM regions and enable those to Agnus via its A19 line. This is the jumper wire to JP2 on the A500 Rev6 PCB.<br /></li><li>If you want to support more than 512K of slow RAM, you need to decode both A19 and A20 and fake the /REGEN and /RAMEN signals towards Agnus. (/REGEN is "chipset register space is being accessed.) That way Agnus still thinks a RAM cycle is being initiated, even if it can't "see" the larger RAM address space.</li><li>Then you need A19/A20 - or a modified version - to the trapdoor RAM expansion. This is the extra 2 bits, or 4 banks of 512KB, to decode all that extra RAM.</li><li>If Agnus is asserting /BLIT - which says it's doing a DMA cycle, then we need to ensure it's going to U1 on the RAM expansion, or the second 512KB chip RAM bank.</li></ul><p>Now, this last point is important for me and other 1MB Amiga chip RAM amiga 500s. How can this RAM expansion even work if there is 1MB of chip RAM on-board? The on-board RAM has all of the /CAS lines from Agnus wired up, without going through the mux.</p><p>I think the answer is "not without modifying the board." /RAS0 will continue to enable the first 512K bank. The other 512KB bank and the slow RAM expansion will run off of /RAS1. What I'm likely going to have to do is:</p><ul style="text-align: left;"><li>Build a 74LS139 adapter board myself for the mainboard;</li><ul><li>Run the /CAS lines from the expansion connector to it;</li><li>Run the Gary expansion adapter A19/A20 lines to it;<br /></li></ul><li>Lift the /CAS lines from the other 512KB RAM I installed, and route it to the 74LS139, like what PeteAU's RAM expansion board does;</li><li>Modify my A501 (that should be here soon!) to use the /CAS lines I feed it from the 74LS139 board, rather than the expansion connector /CAS lines;</li><li>Hope it all works!</li></ul><p>I'll try to remember to report back with some photos! <br /></p><p> <br /></p><p><br /></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com1tag:blogger.com,1999:blog-4361733293216582854.post-28230737232693939152021-07-26T15:10:00.005-07:002021-07-26T15:12:21.372-07:00When off is not off, or "why is my amplifier pulling 30mA when it's off?"<p> I have a little shed out the back with a 100W solar panel on it and a 13.8v battery. Right now it's just running a Raspberry Pi 2 powering an ADS-B decoder which works pretty well.</p><p>So then I added a little bluetooth audio amplifier from Fosi - <a href="https://fosiaudio.com/products/bluetooth-amplifier-bt10a">https://fosiaudio.com/products/bluetooth-amplifier-bt10a</a> . It's small, it's relatively efficient, and it's dumb as bricks to use.</p><p>But then I discovered something amusing.</p><p>It draws like 30mA even when turned off.</p><p>Here is the current meter when plugged into the battery side, but with it turned off.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXFxzkmJulxHBoj_0t-wkBwLTcZuClbaextcYqAqqZGWx1_esimTEpnGKJRpQGUjviCzB1I33xsRLj_VTW8i5mzo7MpLqXxbjDBhWRVF36_xezwLnhQvZR-cDsC7fF7kek6WX6Wb8JxQWl/s442/Screen+Shot+2021-07-26+at+2.42.31+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="254" data-original-width="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXFxzkmJulxHBoj_0t-wkBwLTcZuClbaextcYqAqqZGWx1_esimTEpnGKJRpQGUjviCzB1I33xsRLj_VTW8i5mzo7MpLqXxbjDBhWRVF36_xezwLnhQvZR-cDsC7fF7kek6WX6Wb8JxQWl/s320/Screen+Shot+2021-07-26+at+2.42.31+PM.png" width="320" /></a></div><br /><p>.. and then I disconnect the power to it entirely, and ...</p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSmORhqAOnhG7fCw_Pj8PmJUMsx_BJFttEosaLDEuKg8iEvlIWFemgwzbDmcinwHrkTdfOhwlK6s0HltiOUjTUMKQtUJ3zIc1DdItX9Tym0sxLvBlpxOAKYvtDLB3egSJVsQEFvVsN9g1M/s618/Screen+Shot+2021-07-26+at+2.42.38+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="312" data-original-width="618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSmORhqAOnhG7fCw_Pj8PmJUMsx_BJFttEosaLDEuKg8iEvlIWFemgwzbDmcinwHrkTdfOhwlK6s0HltiOUjTUMKQtUJ3zIc1DdItX9Tym0sxLvBlpxOAKYvtDLB3egSJVsQEFvVsN9g1M/s320/Screen+Shot+2021-07-26+at+2.42.38+PM.png" width="320" /></a></div><br /><p>High levels of what the heck.</p><p><br /></p><p>So, I did what I always do when I find silly electronics questions - I disassembled it!</p><p>Here's the active power islands when it's turned off.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-urm8-hztqE5otU6FEyLKdazWEHD8jXWDOWjVkT8J_ZJsSYqpptGJjU3uXH6Wq8LdWYN-GGb39Gn6UlgAd1entg6550kbowSmgzkUE7RJv_M6TOwjdO49-yjy0GkbwxmmQ81u3U4Ao2pn/s1008/bt10a-power-islands-off.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="756" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-urm8-hztqE5otU6FEyLKdazWEHD8jXWDOWjVkT8J_ZJsSYqpptGJjU3uXH6Wq8LdWYN-GGb39Gn6UlgAd1entg6550kbowSmgzkUE7RJv_M6TOwjdO49-yjy0GkbwxmmQ81u3U4Ao2pn/s320/bt10a-power-islands-off.png" width="320" /></a></div><br /><p>The MOSFET at the bottom is an IRF part that's .. always on. Then every other thing circled? That's also always on. That includes what look like opamp bits for the bass/treble filtering, and something op-amp-y feeding into the bluetooth audio offload PCB (that blue module.)</p><p>So what's the switch switching? Well, here's what's on the reverse of the PCB, showing the two power switch pins:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTnwDYfX9VNOE8j5mpKrT7LMckTbsfxnRKtmfYWpXXkhMqikkaVUKD_SroPPhFw-D_svH0z5r_c6lbS2CJjzePzLad6jPescNniQ13uo57Bn40EqRb3AEL85JWhconQSdmRiwgDbe7hDn/s508/Screen+Shot+2021-07-26+at+3.08.03+PM.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="508" data-original-width="334" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTnwDYfX9VNOE8j5mpKrT7LMckTbsfxnRKtmfYWpXXkhMqikkaVUKD_SroPPhFw-D_svH0z5r_c6lbS2CJjzePzLad6jPescNniQ13uo57Bn40EqRb3AEL85JWhconQSdmRiwgDbe7hDn/s320/Screen+Shot+2021-07-26+at+3.08.03+PM.png" /></a></div><br /><p>Note that one of those power pins is grounded. Yes, it's just some logic line feeding a silicon switch somewhere. And it's definitely not switching the IRF MOSFET at the beginning of the circuit - that'd be too easy.<br /><br /></p><p>Anyway. This amplifier will just pull ~ 350mW when<u style="font-weight: bold;"> turned off.</u> I'm going to wire up a separate little switch and LED to feed power into the amplifier so I'm not discharging the battery for no reason.</p><p>But in any case, that's kinda hilarious.</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-9505063022280889722021-07-22T12:13:00.003-07:002021-07-22T12:13:50.398-07:00On calibrating up a ubitx, or "why the hell is this so complicated"<p> I've built a few of ubitx/bitx40 radios over the last couple years. I built one of each for me, and a couple for other hams.</p><p>The biggest gotcha in this whole mess has been figuring out how to calibrate the thing. The ubitx has two oscillators to calibrate - the VFO and the BFO. The VFO is used for tuning, and the BFO is used for the third intermediate frequency (IF) to fall within the passband of the crystal filter.</p><p>However, exactly zero (0) of the PCBs I've received have been calibrated even remotely correctly, so I've had to go spend time figuring out how to do it myself. Unfortunately it's not been super easy - the instructions online make it sound way simpler than it really is, and unless you're super careful you're going to end up constantly being off frequency in SSB mode.</p><p>Ok, so here goes.</p><p>The ubitx radio is organised in a very specifically clever way for CW versus SSB, which makes calibration actually not TOO terrible. In SSB mode all three oscillators are used in a three stage IF design. In CW mode however, the transmit side doesn't bother with the SSB path at all - it directly unbalances the first IF mixer and transmits using the VFO oscillator directly on the transmit frequency.</p><p>So when calibrating the VFO, the reason it wants to calibrate it using transmit instead of receive is because it doesn't involve the BFO frequency /at all/. Instead, it's calibrating only the VFO frequency directly.</p><p>Now, what's it calibrating? Well, it's calibrating the crystal offset value, not a frequency offset in Hz. Ie, it's calibrating the offset between what you think 10MHz is when you program in 10MHz and what it's actually outputting. This affects all the clocks generated from the si5351 oscillator - not just the VFO!</p><p>This is important - when you calibrate the VFO, you're calibrating the whole frequency offset of the si5351, and that includes the BFO. Thus, if you calibrate the VFO, you will muck up your BFO offset.</p><p>When you do this stage, figure it out and write it down. I wish the offset was the whole 16 bit number so you could just dial THAT in, instead of how it's currently displayed (as a divided version of that, notionally ppm.)</p><p>I calibrate my VFO using a frequency counter and an RF tap. It's the only way to be sure. If you have a known-good receiver, you can tune it in SSB mode and do the math to figure out what the outputted tone will be at the given receive frequency. I've done this a couple times (before I bought a second hand frequency counter) using fldigi to display the audio spectrum, putting the radio into SSB mode and tuning to 9999.20 KHz. The 10MHz signal will show up as an 800Hz audio tone.</p><p>Anyway. Once you've done the VFO, it's time to calibrate the BFO. You have to NOT touch the VFO calibration at this point or it'll change your BFO calibration and you'll have to start again.</p><p>Ok, so the next oscillator is the USB/LSB frequency oscillator. The frequency is either ~57MHz or ~33MHz depending upon USB or LSB operation, so when the incoming signal mixes with this, the desired mixing product (either inverted or non inverted) shows up in the crystal filter passband. Now, in my v4 firmware I've made this also configurable, but by default it's a fixed value that they hope is in the passband of the crystal filter. I mention this only for completeness, you normally don't have to calibrate this.</p><p>The BFO calibration is more fiddly. This is the oscillator that when mixed with the output of the above stage brings the mixing product down to audio frequencies. (Ie, it's an SSB detector!)</p><p>When you start the calibration it'll reset to whatever the default is in the firmware, which is WAY off. When you start tuning in the BFO you'll hear the frequency spread of the background white noise shift as more of it comes into the passband, and .. then it'll disappear! And then as you keep tuning past the crystal filter frequency, it'll come back again! What's going on!</p><p>What's going on is that when you plot the frequency response of the crystal filter, it may not be exactly one big peak. A good example of it can be found here: <a href="https://ubitx.net/2018/04/14/ssb-crystal-filter-response/ " target="_blank">https://ubitx.net/2018/04/14/ssb-crystal-filter-response/ </a>.</p><p>Now, this is where things get a bit messy. When you change the BFO, it's not just changing the passband on the crystal oscillator. You need to make sure you're on the correct side of the filter so you're not getting an inverted copy of the mixing output.</p><p>The ubitx website suggests listening to an existing sideband transmission and figure out if you're on the right side by tuning the filter for maximum intelligibility. You can't use AM for this (eg WWV) because if you get the wrong side you'll hear a mirrored signal that sounds fine because it's AM, but you just won't be able to decode sideband.</p><p>What I do, since I have more than one good radio, is I hook up my ubitx to an antenna, my good radio to a dummy load, tune to them to the same frequency / sideband mode, set my transmit power to be like 5W on the good radio, and do a radio check. Yes, into my dummy load. The ubitx will definitely be able to hear it, and you can then set the BFO to maximise intelligibility and correct frequency centreing. You'll know for sure that you're on the right side of the crystal filter / mixing output because you'll definitely not hear yourself clearly otherwise.</p><p>After that? Well, I think we need a better way to characterise and calibrate both the USB/LSB frequencies rather than them being static as well as the BFO, and do them together. Ideally we'd be able to tweak both in order to definitely hit the right peak point of the crystal filter to minimise losses, but that will complicate the calibration quite a bit.</p><p>Anyway! Good luck calibrating your ubitx!</p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-22365737506881909152020-12-28T15:44:00.004-08:002020-12-28T15:45:08.892-08:00Repairing and bootstrapping an IBM PC/AT 5170, Part 3<p>So! In Parts 1 and 2 I covered getting this old thing cleaned up, getting it booting, hacking together a boot floppy disc and getting a working file transfer onto a work floppy disc.</p><p>Today I'm going to cover what it took to get it going off of a "hard disk", which in 2020 can look quite a bit different than 1990.</p><p>First up - what's the hard disk? Well, in the 90s we could still get plenty of MFM and early IDE hard disks to throw into systems like this. In 2020, well, we can get Very Large IDE disks from NOS (like multi hundred gigabyte parallel ATA interface devices), but BIOSes tend to not like them. The MFM disks are .. well, kinda dead. It's understandable - they didn't exactly build them for a 40 year shelf life.</p><p>The IBM PC, like most computers at the time, allow for peripherals to include software support in ROM for the hardware you're trying to use. For example, my PC/AT BIOS doesn't know anything about IDE hardware - it only knows about ye olde ST-412/ST-506 Winchester/MFM drive controllers. But contemporary IDE hardware would include the driver code for the BIOS in an on-board ROM, which the BIOS would enumerate and use. Other drive interconnects such as SCSI did the same thing.</p><p>By the time the 80386's were out, basic dumb IDE was pretty well supported in BIOSes as, well, IDE is really code for "let's expose some of the 16 bit ISA bus on a 40 pin ribbon cable to the drives". But, more about that later.</p><p>Luckily some electronics minded folk have gone and implemented alternatives that we can use. Notably:</p><p></p><ul style="text-align: left;"><li>There's now an open-source "Universe IDE BIOS" available for computers that don't have IDE support in their BIOS - notably PC/XT and PC/AT, and</li><li>There are plenty of projects out there which break out the IDE bus on an XT or AT ISA bus - I'm using XT-IDE.</li></ul><div>Now, I bought a little XT-IDE + compact flash card board off of ebay. They're cheap, it comes with the universal IDE bios on a flash device, and ...</div><div><br /></div><div>... well, I plugged it in and it didn't work. So, I wondered if I broke it. I bought a second one, as I don't have other ISA bus computers yet, and ...</div><div><br /></div><div>IT didn't work. Ok, so I know that there's something up with my system, not these cards. I did the 90s thing of "remove all IO cards until it works" in case there was an IO port conflict and ...</div><div><br /></div><div>.. wham! The ethernet card. Both wanted 0x300. I'd have to reflash the Universal IDE BIOS to get it to look at any other address, so off I went to get the Intel Etherexpress 8/16 card configuration utility.</div><div><br /></div><div>Here's an inside shot of the PC/AT with the XT-IDE installed, and a big gaping hole where the Intel EtherExpress 8/16 NIC should be.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs2rdIPUSZ9vRJ4UY8idg60HmAjD6y6RQ9hLUe1Gk8JOYUJs2TT9_X8k-aXAeM18a2Fe606hhQGrounTGheEr_Xjne8stBpNhcTetz1nGCTO76yjTCOTWCmgY08iN-xWpI0dqFb25dg19B/s4032/PXL_20201218_005908876.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs2rdIPUSZ9vRJ4UY8idg60HmAjD6y6RQ9hLUe1Gk8JOYUJs2TT9_X8k-aXAeM18a2Fe606hhQGrounTGheEr_Xjne8stBpNhcTetz1nGCTO76yjTCOTWCmgY08iN-xWpI0dqFb25dg19B/s320/PXL_20201218_005908876.jpg" /></a></div><br /><div><br /></div><div><br /></div><div><br /></div><div>No wait. What I SHOULD do first is get the XT-IDE CF card booting and running.</div><div><br /></div><div>Ok, so - first things first. I had to configure the BIOS drive as NONE, because the BIOS isn't servicing the drive - the IDE BIOS is. Unfortunately, the IDE BIOS is coming in AFTER the system BIOS disks, so I currently can't run MFM + IDE whilst booting from IDE. I'm sure I can figure out how at some point, but that point is not today.</div><div><br /></div><div>Success! It boots!</div><div><br /></div><div>To DOS 6.22!</div><div><br /></div><div>And only the boot sector, and COMMAND.COM! Nooooo!</div><div><br /></div><div>Ok so - I don't have a working 3.5" drive installed, I don't have DOS 6.22 media on 1.2MB, but I can copy my transfer program (DSZ) - and Alley Cat - onto the CF card. But - now I need the DOS 6.22 install media.</div><div><br /></div><div>On the plus side - it's 2020 and this install media is everywhere. On the minus side - it's disk images that I can't easily use. On the double minus side - the common DOS raw disk read/write tool - RAWREAD/RAWRITE - don't know about 5.25" drives! Ugh!</div><div><br /></div><div>However! Here's where a bit of hilarious old knowledge is helpful - although the normal DOS installers want to be run from floppy, there's a thing called the "DOS 6.22 Upgrade" - and this CAN be run from the hard disk. However! You need a blank floppy for it to write the "uninstallation" data to, so keep one of those handy.</div><div><br /></div><div>I extracted the files from the disk images using MTOOLS - "MCOPY -i DISK.IMG ::*.* ." to get everything out - used PKZIP and DSZ to get it over to the CF card, and then ran the upgrader.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVtwX508sfXBCO11xDsvE5C0jvJ5mNMSgYeOL6qqVQqYAm6pxKJSw-cAFQ5mUCXaPSFSjUOjdicplEasDbds-iGWcq-bmNs1bCCXoNp6DMcgtXKdpXt5Bp_JsUhh3fKxAhjuAve39VAsA/s4032/PXL_20201218_005730865.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="433" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVtwX508sfXBCO11xDsvE5C0jvJ5mNMSgYeOL6qqVQqYAm6pxKJSw-cAFQ5mUCXaPSFSjUOjdicplEasDbds-iGWcq-bmNs1bCCXoNp6DMcgtXKdpXt5Bp_JsUhh3fKxAhjuAve39VAsA/w325-h433/PXL_20201218_005730865.jpg" width="325" /></a></div><br /><div>Hello DOS 6.22 Upgrade Setup!</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJpzVQ5OGUHID-5Cz1zTyPZJkfOyvpihISCjeBpQ5cyRjS7pNYHEpbygX81NiFF-_7foQAg4JPlqXMNHDMN7CBUQh7A1HbHkOavzqYJ1PqSil687IpE3U3rSzHJ5JnpwhvyGHnRxBAcNT3/s4032/PXL_20201218_005752601.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJpzVQ5OGUHID-5Cz1zTyPZJkfOyvpihISCjeBpQ5cyRjS7pNYHEpbygX81NiFF-_7foQAg4JPlqXMNHDMN7CBUQh7A1HbHkOavzqYJ1PqSil687IpE3U3rSzHJ5JnpwhvyGHnRxBAcNT3/s320/PXL_20201218_005752601.jpg" /></a></div><br /><div>Ah yes! Here's the uninstall disc step! Which indeed I had on hand for this very moment!</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA1ukpAUZMpkdriMxh4yUcgkSe5K63I6vOn0SMqlAhoC5__OSd4LVFih2BgepLqMyhUYB45nfPKSSyLh0fBFA0gS048NQcfScyedHBUFhCxqb2jLCpVEOkngmVqKENryx9WIzn1DfVrgGp/s4032/PXL_20201218_005906525.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA1ukpAUZMpkdriMxh4yUcgkSe5K63I6vOn0SMqlAhoC5__OSd4LVFih2BgepLqMyhUYB45nfPKSSyLh0fBFA0gS048NQcfScyedHBUFhCxqb2jLCpVEOkngmVqKENryx9WIzn1DfVrgGp/s320/PXL_20201218_005906525.jpg" /></a></div><br /><div>I wonder if I should fill out the registration card for this install and send it to Microsoft.</div><div><br /></div><div>Ok, so that's done and now I have a working full DOS 6.22 installation. Now I can do all the fun things like making a DOS boot disk and recovery things. (For reference - you do that using FORMAT /S A: to format a SYSTEM disk that you can boot from; then you add things to it using COPY.)</div><div><br /></div><div>Finally, I made a boot disk with the Intel EtherExpress 8/16 config program on it, and reconfigured my NIC somewhere other than 0x300. Now, I had to open up the PC/AT, remove the XT-IDE and install the EtherExpress NIC to do this - so yes, I had to boot from floppy disc.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjODMtvDd1gq3AE7HqAW_rFsjxGQYTLj3Idte2iBD53vScy-zKsglPl61tunrJr_2w4jogQXbMmNsmxawApyqdbkxRSRBeGzcPKV2G1ff_y0un9zV3QXOBybFSybtU-4OSLiJVrvvvLfeOa/s4032/PXL_20201218_063543413.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjODMtvDd1gq3AE7HqAW_rFsjxGQYTLj3Idte2iBD53vScy-zKsglPl61tunrJr_2w4jogQXbMmNsmxawApyqdbkxRSRBeGzcPKV2G1ff_y0un9zV3QXOBybFSybtU-4OSLiJVrvvvLfeOa/s320/PXL_20201218_063543413.jpg" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div><br /></div><div><br /></div><div>Once that was done, I added a bunch of basic things like Turbo C 2.0, Turbo Assembler and mTCP. Now, mTCP is a package that really needed to exist in the 90s. However, this and the RAM upgrade (which I don't think I've talked about yet!) will come in the next installment of "Adrian's remembering old knowledge from his teenage years!".</div><div><br /></div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-15498767277478579152020-12-17T12:49:00.001-08:002020-12-17T12:49:08.565-08:00Repairing and bootstrapping an IBM 5170 PC/AT, part 2<p>Ok, so now it runs. But, what did it take to get here?</p><p>First up - I'm chasing down a replacement fusable PROM and I'll likely have to build a programmer for it. The programmer will need to run a <b>bit at a time</b>, which is very different to what the EPROM programmers available today support. It works for now, but I don't like it.</p><p>I've uploaded a dump of the PROM here - <a href="https://erikarn.github.io/pcat/notes.html">https://erikarn.github.io/pcat/notes.html</a> .</p><p>Here's how the repair looks so far:</p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXnsIeqj3Izv-MjRMgQWHUXEFBQBobV1u5st0QtcH7LN4cmSCe_r9-EAXorhmJ3A8QOFOlIuTMqZgq5c3z3YL_UL1aCJqb9CbT0Ch0ozrD37SGyhZ5qxgq4FbJGrBbi6NOJfdKn7a7fb2T/s4032/PXL_20201217_020026985.NIGHT.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXnsIeqj3Izv-MjRMgQWHUXEFBQBobV1u5st0QtcH7LN4cmSCe_r9-EAXorhmJ3A8QOFOlIuTMqZgq5c3z3YL_UL1aCJqb9CbT0Ch0ozrD37SGyhZ5qxgq4FbJGrBbi6NOJfdKn7a7fb2T/s320/PXL_20201217_020026985.NIGHT.jpg" width="320" /></a></div><br /><p><br /></p><p>Next - getting files onto the device. Now, remember the hard disk is unstable, but even given that it's only DOS 5.0 which didn't really ship with any useful file transfer stuff. Everyone expected you'd have floppies available. But, no, I don't have DOS available on floppy media! And, amusingly, I don't have a second 1.2MB drive installed anywhere to transfer files.</p><p>I have some USB 3.5" drives that work, and I have a 3.5" drive and Gotek drive to install in the PC/AT. However, until yesterday I didn't have a suitable floppy cable - the 3.5" drive and Gotek USB floppy thingy both use IDC pin connectors, and this PC/AT uses 34 pin edge connectors. So, whatever I had to do, I had to do with what I had.</p><p>There are a few options available:</p><p></p><ul style="text-align: left;"><li>You can write files in DOS COMMAND.COM shell using COPY CON <file> - it either has to be all ascii, or you use ALT-<3 numbers> to write ALT CODES. For MS-DOS, this would just input that value into the keyboard buffer. For more information, Wikipedia has a nice write-up here: <a href="https://en.wikipedia.org/wiki/Alt_code">https://en.wikipedia.org/wiki/Alt_code</a> .</li><li>You can use an ASCII only assembly as above: a popular one was TCOM.COM, which I kept here: <a href="https://erikarn.github.io/pcat/tcomtxt.asm">https://erikarn.github.io/pcat/tcomtxt.asm</a></li><li>If you have MODE.COM, you could try setting up the serial port (COM1, COM2, etc) to a useful baud rate, turn on flow control, etc - and then COPY COM1 <file>. I didn't try this because I couldn't figure out how to enable hardware flow control, but now that I have it all (mostly) working I may give it a go.</li><li>If you have QBASIC, you can write some QBASIC!</li></ul><div>I tried TCOM.COM, both at 300 and 2400 baud. Both weren't reliable, and there's a reason it isn't - writing to the floppy is too slow! Far, far too slow! And, it wasn't enforcing hardware flow control, which was very problematic for reliable transfers.</div><div><br /></div><div>So, I wrote some QBASIC. It's pretty easy to open a serial port and read/write to it, but it's not AS easy to have it work for binary file transfer. There are a few fun issues:</div><div><br /></div><div><ul style="text-align: left;"><li>Remember, DOS (and Windows too, yay!) has a difference between files open for text reading/writing and files open for binary reading/writing.</li><li>QBASIC has sequential file access or random file access. For sequential, you use INPUT/PRINT, for random you use GET and PUT.</li><li>There's no byte type - you define it as a STRING type of a certain size.</li><li>This is an 8MHz 80286, and .. well, let's just say QBASIC isn't the fastest thing on the planet here.</li></ul><div>I could do some basic IO fine, but I couldn't actually transfer and write out the file contents quickly and reliably. Even going from 1200 to 4800 and 9600 baud didn't increase the transfer rate! So even given an inner loop of reading/writing a single byte at a time with nothing else, it still can't keep up.</div></div><div><br /></div><div>The other amusingly annoying thing is what to use on the remote side to send binary files. Now, you can use minicom and such on FreeBSD/Linux, but it doesn't have a "raw" transfer type - it has xmodem, ymodem, zmodem and ascii transfers. I wanted to transfer a ~ 50KB binary to let me do ZMODEM transfers, and .. well, this presents a bootstrapping problem.</div><div><br /></div><div>After a LOT of trial and error, I ended up with the following:</div><div><br /></div><div><ul style="text-align: left;"><li>I used tip on FreeBSD to talk to the serial port</li><li>I had to put "hf=true" into .tiprc to force hardware handshaking; it didn't seem to work when I set it after I started tip (~s to set a variable)</li><li>On the QBASIC side I had to open it up with hardware flow control to get reliable transfers;</li><li>And I had to 128 byte records - not 1 byte records - to get decent transfer performance!</li><li>On tip to send the file I would ask it to fork 'dd' to do the transfer (using ~C) and asking it to pad to the 128 byte boundary:</li><ul><li>dd if=file bs=128 conv=sync</li></ul></ul><div>The binary I chose (DSZ.COM) didn't mind the extra padding, it wasn't checksumming itself.</div></div><div><br /></div><div>Here's the hacky QBASIC program I hacked up to do the transfer:</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><span style="font-family: courier;">OPEN "RB", #2, "MYFILE.TXT", 128<br /><br /></span></div><div style="text-align: left;"><span style="font-family: courier;">' Note: LEN = 128 is part of the OPEN line, not a separate line!<br />OPEN "COM1:9600,N,8,1,CD0,CS500,DS500,OP0,BIN,TB2048,RB32768" FOR RANDOM AS #1 LEN = 128<br /><br /></span></div><div style="text-align: left;"><span style="font-family: courier;">size# = 413 '413 * 128 byte transfer<br />DIM c AS STRING * 128 ' 128 byte record<br />FOR i = 1 TO size#<br /> GET #1, , c<br /> PUT #2, , c<br />NEXT i<br />CLOSE #2<br />CLOSE #1</span></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Now, this is hackish, but specifically:</div><div style="text-align: left;"><ul style="text-align: left;"><li>9600 baud, 8N1, hardware flow control, 32K receive buffer.</li><li>128 byte record size for both the file and UART transfers.</li><li>the DSZ.COM file size, padded to 128 bytes, was 413 blocks. So, 413 block transfers.</li><li>Don't forget to CLOSE the file once you've written, or DOS won't finalise the file and you'll end up with a 0 byte file.</li></ul><div>This plus tip configured for 9600 and hardware flow control did the right thing. I then used DSZ to use ZMODEM to transfer a fresh copy of itself, and CAT.EXE (Alley Cat!)</div><div><br /></div><div>Ok, so that bootstrapped enough of things to get a ZMODEM transfer binary onto a bootable floppy disc containing a half-baked DOS 5.0 installation. I can write software with QBASIC and I can transfer files on/off using ZMODEM.</div><div><br /></div><div>Next up, getting XT-IDE going in this PC/AT and why it isn't ... well, complete.</div><div><br /></div><br /></div><div style="text-align: left;"><br /></div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-62591719478324432152020-12-16T00:06:00.003-08:002020-12-16T00:06:51.101-08:00Repairing and bootstrapping an IBM 5170 PC/AT, part 1<p> I bought an IBM PC/AT 5170 a few years ago for a Hackerdojo project that didn't end up going anywhere.</p><p>So, I have a PC/AT with:</p><p></p><ul style="text-align: left;"><li>8MHz 80286 (type 3 board)</li><li>512K on board</li><li>128K expansion board (with space for 512K extended RAM, 41256 RAM chip style)</li><li>ST4038 30MB MFM drive with some gunk on head or platter 3 (random head 3 read failures, sigh)</li><li>1.2MB floppy drive</li><li>CGA card</li><li>Intel 8/16 ethernet card</li></ul><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgqdfpD5Ul5RTUsft1eU0Lni2yDykMZAWmVE7H2apgrO8Jy8uprUugiwOJ-vokln2sPT8KIy9Pl9rI7MgWGMuqm9ZlHPNVg1e9ajyfrRktJRxw5xQrDrWz77wuu166e5ax7oCB4rEVfl6J/s2592/20200708_223609.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1944" data-original-width="2592" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgqdfpD5Ul5RTUsft1eU0Lni2yDykMZAWmVE7H2apgrO8Jy8uprUugiwOJ-vokln2sPT8KIy9Pl9rI7MgWGMuqm9ZlHPNVg1e9ajyfrRktJRxw5xQrDrWz77wuu166e5ax7oCB4rEVfl6J/s320/20200708_223609.jpg" width="320" /></a></div><br /><div><br /></div><div><br /></div><div>Ok, so the bad disk was a pain in the ass. It's 2020, DOS on 1.2MB floppy disks isn't exactly the easiest thing to come across. But, it DOES occasionally boot.</div><div><br /></div><div>But, first up - the BIOS battery replacement had leaked. Everywhere. So I replaced that, and had to type in a BASIC program into ROM BASIC to reprogram the BIOS NVRAM area with a default enough configuration to boot from floppy or hard disk.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9QaGE-3FXbh7RdJDttiCy1GUo_Kgoad8B61ZN-O8ZrkIznl8TBGs-OHd77XnRCWSV43XROAqS8ErArbiuPRdGngqUEFxKVpVvRycKwVdh-tsOId1rnQIuiESmzMua_Y0wwH_DtycpWJH5/s2592/20200708_204243.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1944" data-original-width="2592" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9QaGE-3FXbh7RdJDttiCy1GUo_Kgoad8B61ZN-O8ZrkIznl8TBGs-OHd77XnRCWSV43XROAqS8ErArbiuPRdGngqUEFxKVpVvRycKwVdh-tsOId1rnQIuiESmzMua_Y0wwH_DtycpWJH5/s320/20200708_204243.jpg" width="320" /></a></div><br /><div><br /></div><div><br /></div><div>Luckily someone had done that:</div><div><br /></div><div><a href="http://www.minuszerodegrees.net/5170/setup/5170_setup.htm">http://www.minuszerodegrees.net/5170/setup/5170_setup.htm</a></div><div><br /></div><div>So, I got through that.</div><div><br /></div><div>Then, I had to buy some double high density 5.25" discs. Ok, well, that took a bit, but they're still available as new old stock (noone's making floppy discs anymore, sigh.) I booted the hard disk and after enough attempts at it, it booted to the command prompt. At which point I promptly created a bootable system disc and copied as much of DOS 5.0 off of it as I could.</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6NOB0Lq4DDYNIdMHXjLl3VzEYYiSX0AUbyygS3L07Pc69nftruELrxV9psuDBUszUx3sNA91LEj_R7EN1eaIOOGWPjyMK_bck55aBtxRy9oVKuPqBiSzN3-F87FoaiH6AzviSGBRBN42/s4032/IMG_20200708_222813.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3024" data-original-width="4032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS6NOB0Lq4DDYNIdMHXjLl3VzEYYiSX0AUbyygS3L07Pc69nftruELrxV9psuDBUszUx3sNA91LEj_R7EN1eaIOOGWPjyMK_bck55aBtxRy9oVKuPqBiSzN3-F87FoaiH6AzviSGBRBN42/s320/IMG_20200708_222813.jpg" width="320" /></a></div><br /><div><br /></div><div><br /></div><div>Then, since I am a child of the 80s and remember floppy discs, I promptly DISCCOPY'ed it to a second disc that I'm leaving as a backup.</div><div><br /></div><div>And, for funsies, DOSSHELL.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggLc_-RMpOhdDBIOSTuK7ZFfUrO9dbZTZBK_Be5Mb4942zRdttSa0TWOgEgFl3gP3RqcHwOVcPGkFxKwPPeroszaDAu52mdL-F444b6qvmEAK2E-eCDrrHU8wAvAPxtTv8A478OTs7BTnb/s2592/20200708_223430.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1944" data-original-width="2592" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggLc_-RMpOhdDBIOSTuK7ZFfUrO9dbZTZBK_Be5Mb4942zRdttSa0TWOgEgFl3gP3RqcHwOVcPGkFxKwPPeroszaDAu52mdL-F444b6qvmEAK2E-eCDrrHU8wAvAPxtTv8A478OTs7BTnb/s320/20200708_223430.jpg" width="320" /></a></div><br /><div><br /></div><div><br /></div><div>Ok, so what's next?</div><div><br /></div><div>I decided to buy an alternate BIOS - the Quadtel 286 image that's floating about - because quite frankly having to type in that BASIC program into ROM BASIC every time was a pain in the ass. So, in it went. Which was good, because...</div><div><br /></div><div>Well, then it stopped working. It turns out that my clean-up of the battery leakage wasn't enough. The system booted with three short beeps and "0E" on the screen.</div><div><br /></div><div>Now we get into deep, deep PC history.</div><div><br /></div><div>Luckily, the Quadtel BIOS codes are available here:</div><div><br /></div><div><a href="http://www.bioscentral.com/postcodes/quadtelbios.htm">http://www.bioscentral.com/postcodes/quadtelbios.htm</a></div><div><br /></div><div>.. but with the Intel BIOS, it didn't beep, it didn't do anything. Just a black screen.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">What gives?</div><div style="text-align: left;"><br /></div><div style="text-align: left;">So, starting with PC/AT and clone machines, the BIOS would write status updates during boot to a fixed IO port. Then if you have a diagnostic card that monitors that IO port, you'd get updates on where the system go to during boot before it hit a problem. These are called POST (power on self test) codes.</div><div style="text-align: left;"><br /></div><div style="text-align: left;">Here's a write-up of it and some POST cards:</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><a href="http://www.minuszerodegrees.net/misc/post_cards.htm">http://www.minuszerodegrees.net/misc/post_cards.htm</a></div><div><br /></div><div>Luckily, the Quadtel BIOS just spat it out on the screen for me. Phew.</div><div><br /></div><div>So! 0xE says the 8254 interval timer wasn't working. I looked on the board and ... voila! It definitely had a lot of rusty looking crap on it. U115, a 32 byte PROM used for some address line decoding also was unhappy.</div><div><br /></div><div>Here's how it looked before I had cleaned it up - this is circa July:</div><div><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh938S8ekzMiMvEqaaHMNO0D3c8623DYIp9KsrEDAGlck5aAh4a6uh_couRHumwGQh40CvTxcIK8KS8Gkt07NPVTjneaJ4emthyphenhyphenyv1Sniaz6g0mh3NmxbM89sqGzftxMjaFW5YDtLoCicdf/s4032/20200708_194616.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh938S8ekzMiMvEqaaHMNO0D3c8623DYIp9KsrEDAGlck5aAh4a6uh_couRHumwGQh40CvTxcIK8KS8Gkt07NPVTjneaJ4emthyphenhyphenyv1Sniaz6g0mh3NmxbM89sqGzftxMjaFW5YDtLoCicdf/s320/20200708_194616.jpg" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JwMKoLCy99yCUVxxwlFk7wp_4HKldQFTXEJ_KQ_fnu6JwtSB36yzABclUTRvwfZ6pCb7rBl9mYbAyjKNKoLkFvmZxy8Pn7iz9eqxGfB2Vl3PTIDJf3oWMo0n8QQq6nq6uRQfyB0Defbg/s4032/20200708_194613.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="4032" data-original-width="3024" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-JwMKoLCy99yCUVxxwlFk7wp_4HKldQFTXEJ_KQ_fnu6JwtSB36yzABclUTRvwfZ6pCb7rBl9mYbAyjKNKoLkFvmZxy8Pn7iz9eqxGfB2Vl3PTIDJf3oWMo0n8QQq6nq6uRQfyB0Defbg/s320/20200708_194613.jpg" /></a></div><br /><div><br /></div><div>I had cleaned all of this out and used some vinegar on a Q-tip to neutralise the leaked battery gunk, but I didn't get underneath the ICs.</div><div><br /></div><div>So, out they both came. I cleaned up the board, repaired some track damage and whacked in sockets.</div><div><br /></div><div>Then in went the chips - same issue. Then I was sad.</div><div><br /></div><div>Then! Into the boxes of ICs I went - where I found an 8254-2 that was spare! I lifted it from a dead PC clone controller board a while ago. In IT went, and the PC/AT came alive again.</div><div><br /></div><div>(At this point I'd like to note that I was super afraid that the motherboard was really dead, as repairing PC/AT motherboards is not something I really wanted to do. Well, it's done and it works.)</div><div><br /></div><div>Rightio! So, the PC boots, CGA monitor and all, from floppy disc. Now comes the fun stuff - how do I bootstrap said PC/AT with software, given no software on physical media? Aha, that's in part 2.</div><div><br /></div><p></p>Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-10591368002543243262020-07-24T19:24:00.000-07:002020-07-24T19:24:06.218-07:00RFI from crappy electronics, or "how's this sold in the US?"I picked up a cheap charging cable for my Baofeng UV-9S. (<a href="https://www.amazon.com/gp/product/B07TSDSQ4Z/">https://www.amazon.com/gp/product/B07TSDSQ4Z/</a>). It .. well, it works.<br />
<br />
But it messes up operating my radios! I heard super strong interference on my HF receiver and my VHF receivers.<br />
<br />
So, let's take a look. I setup a little antenna in my shack. The baofeng was about 6ft away.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi81L2PcwkvPVrq5FTiNI7o9oqazrgL6kctl_LoOnNyPDiOqdzYGYtf4q1Vjz9TW-DTY2uBIGPZFLADEu7r0yLxMZV2InQVp9_8HBvOUlzVR-1mp9OOp60Pw-dmEZZH-aTqfulLiL4saA3y/s1600/IMG_20200724_173618.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi81L2PcwkvPVrq5FTiNI7o9oqazrgL6kctl_LoOnNyPDiOqdzYGYtf4q1Vjz9TW-DTY2uBIGPZFLADEu7r0yLxMZV2InQVp9_8HBvOUlzVR-1mp9OOp60Pw-dmEZZH-aTqfulLiL4saA3y/s320/IMG_20200724_173618.jpg" width="320" /></a></div>
<br />
Here's DC to 120MHz. Those peaks to the right? Broadcast FM. The marker is at 28.5MHz.<br />
<br />
Ok, let's plug in the baofeng and charger.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSltlvO-KKnO-i1oFn6MLWQ-EYDLfVI9GOOOeXO6sbvYlYd5KZf5fjXls2lnc0kZLxIl7yaF6X9MgumvC0y-daWaC0nqY1E41PglDKZkJ8db40hJtk9Vhv4ImoP8bz_oXz8gwcgzqTLquM/s1600/IMG_20200724_173629.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSltlvO-KKnO-i1oFn6MLWQ-EYDLfVI9GOOOeXO6sbvYlYd5KZf5fjXls2lnc0kZLxIl7yaF6X9MgumvC0y-daWaC0nqY1E41PglDKZkJ8db40hJtk9Vhv4ImoP8bz_oXz8gwcgzqTLquM/s320/IMG_20200724_173629.jpg" width="320" /></a></div>
<br />
Ok, look at that noise. Ugh. That's unfun.<br />
<br />
What about VHF? Let's look at that. 100-300MHz.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEevPKeLuswYDC-4inFgMDGITjZHDqlMzQIoh-aNcteXTsSaykwllPt3QW4eZhAB36y6A55RavPFRiWDCI-nRwL8INHtP8LUTTOK60ptHJEKmK2KhxvIhgZz0ORijF2o06y2Zt9lG9bTxI/s1600/IMG_20200724_173451.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEevPKeLuswYDC-4inFgMDGITjZHDqlMzQIoh-aNcteXTsSaykwllPt3QW4eZhAB36y6A55RavPFRiWDCI-nRwL8INHtP8LUTTOK60ptHJEKmK2KhxvIhgZz0ORijF2o06y2Zt9lG9bTxI/s320/IMG_20200724_173451.jpg" width="320" /></a></div>
<br />
Ok, that's expected too. I think that's digital TV or something in there. Ok, now, let's plug in the charger, without it charging..<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNdDO4lDJ_WipbuPWRqJgMRabITrBWrX6SvTzJxRQ-i4H9k4-oVxkrHbtQKYCkTwNXHiK-XzyDpnIP4Z3-bNC875v3yG66TsS1_y5VBkP9NZ2E4A-clDDv3Ic6tEnMA1VSF0OwxmyJeKfl/s1600/IMG_20200724_173515.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNdDO4lDJ_WipbuPWRqJgMRabITrBWrX6SvTzJxRQ-i4H9k4-oVxkrHbtQKYCkTwNXHiK-XzyDpnIP4Z3-bNC875v3yG66TsS1_y5VBkP9NZ2E4A-clDDv3Ic6tEnMA1VSF0OwxmyJeKfl/s320/IMG_20200724_173515.jpg" width="320" /></a></div>
<br />
Whaaaaaaaaattttttt oh wait. Yeah, this is likely an unshielded buck converter and it's unloaded. Ok, let's load it up.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii32hGSGmW107efr2kdH1sYCbZSmwN0Ae0ClF9ytUPKo9g2PU1532ShaienKO4qQ0MdlZ425YUwT8SGV3XjpUioAdUoCjbqROA6qNJLzBek7SdWUIIuv1W-ssknpJ0c-nUgjJ4XGBNrTVe/s1600/IMG_20200724_173444.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii32hGSGmW107efr2kdH1sYCbZSmwN0Ae0ClF9ytUPKo9g2PU1532ShaienKO4qQ0MdlZ425YUwT8SGV3XjpUioAdUoCjbqROA6qNJLzBek7SdWUIIuv1W-ssknpJ0c-nUgjJ4XGBNrTVe/s320/IMG_20200724_173444.jpg" width="320" /></a></div>
<br />
Whaaaaaa oh ok. Well that explains everything.<br />
<br />
Let's pull it open:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnNAU9LjxhgqdhDlCQb4v06_VSo7RcJNUQP-UEpGtnY8pSKBiYicsq2wnvkCcWo7J9cUVZvkQ-L3_y0nZJWgKaJXDyg33RucN995qcWXlqnkwG2DAV6Dh-_c4pAoGIlCM_hi5qg-CiG9S/s1600/IMG_20200724_174019.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsnNAU9LjxhgqdhDlCQb4v06_VSo7RcJNUQP-UEpGtnY8pSKBiYicsq2wnvkCcWo7J9cUVZvkQ-L3_y0nZJWgKaJXDyg33RucN995qcWXlqnkwG2DAV6Dh-_c4pAoGIlCM_hi5qg-CiG9S/s320/IMG_20200724_174019.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm0oGdPmqDheKzZc6Rp36x0R-yR3c-YBfToRL94IFl6ODRYNMcuUS6F9ojp3tM1n-IocyzwL2MHLJUk9j_BL8hEVplrtcblbSf58iI95ggFAJOe10D47rc74AK7Hb5r6vag2G-yiYS3C9l/s1600/IMG_20200724_174025.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm0oGdPmqDheKzZc6Rp36x0R-yR3c-YBfToRL94IFl6ODRYNMcuUS6F9ojp3tM1n-IocyzwL2MHLJUk9j_BL8hEVplrtcblbSf58iI95ggFAJOe10D47rc74AK7Hb5r6vag2G-yiYS3C9l/s320/IMG_20200724_174025.jpg" width="320" /></a></div>
<br />
Yup. A buck converter going from 5v to 9v; no shielding, no shielded power cable <b>and</b> no ground plane on the PCB. This is just amazing. The 3ft charge cable is basically an antenna. "Unintentional radiator" indeed.<br />
<br />
So - even with a ferrite on the cable, it isn't quiet.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6igjQihir-Rp_T3WUop8494qdkbb1jHFSDfsqSJRZb1hR7gm6vwQpS6w-kT1x09DVYfshOjVECgJneYGckK2VO-pKY7EQhCViQ7BS7Ljno5N7MagoqTHFzf6cFrj9JM2C92BXXb3Esjui/s1600/IMG_20200724_173934.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1200" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6igjQihir-Rp_T3WUop8494qdkbb1jHFSDfsqSJRZb1hR7gm6vwQpS6w-kT1x09DVYfshOjVECgJneYGckK2VO-pKY7EQhCViQ7BS7Ljno5N7MagoqTHFzf6cFrj9JM2C92BXXb3Esjui/s320/IMG_20200724_173934.jpg" width="240" /></a></div>
<br />
It's quiet at 28MHz now so I can operate on the 10m band with it charging, but this doesn't help at all at VHF.<br />
<br />
Ew.<br />
<br />
<br />
<br />
<br />Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-72914071986226566802020-07-15T10:45:00.000-07:002020-07-15T10:45:59.899-07:00Fixing up ath_rate_sample to actually work well with 11nWay back in 2011 when I was working on FreeBSD's Atheros 802.11n support I needed to go and teach some rate control code about 802.11n MCS rates. (As a side note, the other FreeBSD wifi hackers and I at the time taught wlan_amrr - the AMRR rate control in net80211 - about basic MCS support too, and fixing that will be the subject of a later post.)<br />
<br />
The initial hacks I did to ath_rate_sample made it kind of do MCS rates OK, but it certainly wasn't great. To understand why then and what I've done now, it's best to go for a little trip down journey lane - the initial sample rate control algorithm by John Bicket. You can find a copy of the paper he wrote here - <a href="https://pdos.csail.mit.edu/papers/jbicket-ms.pdf">https://pdos.csail.mit.edu/papers/jbicket-ms.pdf</a> .<br />
<br />
Now, sample didn't try to optimise maximum throughput. Instead, it attempts to optimise for minimum airtime to get the job done, and also attempted to minimise the time spent sampling rates that had a low probability of working. Note this was all done circa 2005 - at the time the other popular rate control methods tried to maintain the highest PHY rate that met some basic success rate (eg packet loss, bit error rate, etc, etc.) The initial implementation in FreeBSD also included multiple packet size bins - 250 and 1600 bytes - to allow rate selection based on packet length.<br />
<br />
However, it made some assumptions about rates that don't quite hold in the 802.11n MCS world. Notably, it didn't take the PHY bitrate into account when comparing rates. It mostly assumed that going up in rate code - except between CCK and OFDM rates - meant it was faster. Now, this is true for 11b, 11g and 11a rates - again except when you transition between 11b and 11g rates - but this definitely doesn't hold true in the 802.11n MCS rate world. Yes, between MCS0 to MCS7 the PHY bitrate goes up, but then MCS8 is MCS0 times two streams, and MCS16 is MCS0 times three streams.<br />
<br />
So my 2011/2012 just did the minimum hacks to choose /some/ MCS rates. It didn't take the length of aggregates into account; it just used the length of the first packet in the aggregate. Very suboptimal, but it got MCS rates going.<br />
<br />
Now fast-forward to 2020. This works fine if you're close to the other end, but it's very terrible if you're at the fringes of acceptable behaviour. My access points at home are not well located and thus I'm reproducing this behaviour very often - so I decided to fix it.<br />
<br />
First up - packet length. I had to do some work to figure out how much data was in the transmit queue for a given node and TID. (Think "QoS category.") The amount of data in the queue wasn't good enough - chances are we couldn't transmit all of it because of 802.11 state (block-ack window, management traffic, sleep state, etc.) So I needed a quick way to query the amount of traffic in the queue taking into account 802.11 state. That .. ended up being a walk of each packet in the software queue for that node/TID list until we hit our limit, but for now that'll do.<br />
<br />
So then I can call ath_rate_lookup() to get a rate control schedule knowing how long a packet may be. But depending up on the rate it returns, the amount of data that may be transmitted could be less - there's a 4ms limit on 802.11n aggregates, so at lower MCS rates you end up only sending much smaller frames (like 3KB at the slowest rate.) So I needed a way to return how many bytes to form an aggregate for as well as the rate. That informed the A-MPDU formation routine how much data it could queue in the aggregate for the given rate.<br />
<br />
I also stored that away to use when completing the transmit, just to line things up OK.<br />
<br />
Ok, so now I'm able to make rate control decisions based on how much data needs to be sent. ath_rate_sample still only worked with 250 and 1600 byte packets. So, I extended that out to 65536 bytes in mostly-powers-of-two values. This worked pretty well right out of the box, but the rate control process was still making pretty trash decisions.<br />
<br />
The next bit is all "statistics". The decisions that ath_rate_sample makes depend upon accurate estimations of how long packet transmissions took. I found that a lot of the logic was drastically over-compensating for failures by accounting a LOT more time for failures at each attempted rate, rather than only accounting how much time failed at that rate. Here's two examples:<br />
<ul>
<li>If a rate failed, then all the other rates would get failure accounted for the whole length of the transmission to that point. I changed it to only account for failures for that rate - so if three out of four rates failed, each failed rate would only get their individual time accounted to that rate, rather than everything.</li>
<li>Short (RTS/CTS) and long (no-ACK) retries were being accounted incorrectly. If 10 short retries occured, then the maximum failed transmission for that rate can't be 10 times the "it happened" long retry style packet accounting. It's a short retry; the only thing that could differ is the rate that RTS/CTS is being exchanged at. Penalising rates because of bursts of short failures was incorrect and I changed that accounting.</li>
</ul>
There are a few more, but you can look at the change log / change history for sys/dev/ath/ath_rate/sample/ to see.<br />
<br />
By and large, I pretty accurately nailed making sure that failed transmit rates account for THEIR failures, not the failures of other rates in the schedule. It was super important for MCS rates because mis-accounting failures across the 24-odd rates you can choose in 3-stream transmit can have pretty disasterous effects on throughput - channel conditions change super frequently and you don't want to penalise things for far, far too long and it take a lot of subsequent successful samples just to try using that rate again.<br />
<br />
So that was the statistics side done.<br />
<br />
Next up - choices.<br />
<br />
Choices was a bit less problematic to fix. My earlier hacks mostly just made it possible to choose MCS rates but it didn't really take into account their behaviour. When you're doing 11a/11g OFDM rates, you know that you go in lock-step from 6, 12, 18, 24, 36, 48, 54MB, and if a rate starts failing the higher rate will likely also fail. However, MCS rates are different - the difference between MCS0 (1/2 BPSK, 1 stream) and MCS8 (1/2 BPSK, 2 streams) is only a couple dB of extra required signal strength. So given a rate, you want to sample at MCS rates around it but also ACROSS streams. So I mostly had to make sure that if I was at say MCS3, I'd also test MCS2 and MCS4, but I'd also test MCS10/11/12 (the 2-stream versions of MCS2/3/4) and maybe MCS18/19/20 for 3-stream. I also shouldn't really bother testing too high up the MCS chain if I'm at a lower MCS rate - there's no guarantee that MCS7 is going to work (5/6 QAM64 - fast but needs a pretty clean channel) if I'm doing ok at MCS2. So, I just went to make sure that the sampling logic wouldn't try all the MCS rates when operating at a given MCS rate. It works pretty well - sampling will try a couple MCS rates either side to see if the average transmit time for that rate is higher or lower, and then it'll bump it up or down to minimise said average transmit time.<br />
<br />
However, the one gotcha - packet loss and A-MPDU.<br />
<br />
ath_rate_sample was based on single frames, not aggregates. So the concept of average transmit time assumed that the data either got there or it didn't. But, with 802.11n A-MPDU aggregation we can have the higher rates succeed at transmitting SOMETHING - meaning that the average transmit time and long retry failure counts look great - but most of the frames in the A-MPDU are dropped. That means low throughput and more actual airtime being used.<br />
<br />
When I did this initial work in 2011/2012 I noted this, so I kept an EWMA of the packet loss both of single frames and aggregates. I wouldn't choose higher rates whose EWMA was outside of a couple percent of the current best rate. It didn't matter how good it looked at the long retry view - if only 5% of sub-frames were ACKed, I needed a quick way to dismiss that. The EWMA logic worked pretty well there and only needed a bit of tweaking.<br />
<br /><br />
A few things stand out after testing:<br />
<br />
<ul>
<li>For shorter packets, it doesn't matter if it chooses the one, two or three stream rate; the bulk of the airtime is overhead and not data. Ie, the difference between MCS4, MCS12 and MCS20 is any extra training symbols for 2/3 stream rates and a few dB extra signal strength required. So, typically it will alternate between them as they all behave roughly the same.</li>
<li>For longer packets, the bulk of the airtime starts becoming data, so it begins to choose rates that are obviously providing lower airtime and higher packet success EWMA. MCS12 is the choice for up to 4096 byte aggregates; the higher rates start rapidly dropping off in EWMA. This could be due to a variety of things, but importantly it's optimising things pretty well.</li>
</ul>
There's a bunch of future work to tidy this all up some more but it can wait.<br />
<br />Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com1tag:blogger.com,1999:blog-4361733293216582854.post-6611685669016979102020-07-15T10:41:00.004-07:002020-07-15T10:45:14.683-07:00I'm back into the grind of FreeBSD's wireless stack and 802.11achi!<br />
<br />
Yes, it's been a while since I posted here and yes, it's been a while since I was actively working on FreeBSD's wireless stack. Life's been .. well, life. I started the ath10k port in 2015. I wasn't expecting it to take 5 years, but here we are. My life has changed quite a lot since 2015 and a lot of the things I was doing in 2015 just stopped being fun for a while.<br />
<br />
But the stars have aligned and it's fun again, so here I am.<br />
<br />
Here's where things are right now.<br />
<br />
First up - if_run. This is the Ralink (now mediatek) 11abgn USB driver for stuff that they made before Mediatek acquired them. A contributor named Ashish Gupta showed up on the #freebsd-wifi IRC channel on efnet to start working on 11n support to if_run and he got it to the point where the basics worked - and I took it and ran with it enough to land 20MHz 11n support. It turns out I had a couple of suitable NICs to test with and, well, it just happened. I'm super happy Ashish came along to get 11n working on another NIC.<br />
<br />
The if_run TODO list (which anyone is welcome to contribute to):<br />
<br />
<ul>
<li>Ashish is looking at 40MHz wide channel support right now;</li>
<li>Short and long-GI support would be good to have;</li>
<li>we need to get 11n TX aggregation working via the firmware interface - it looks like the Linux driver has all the bits we need and it doesn't need retransmission support in net80211. The firmware will do it all if we set up the descriptors correctly.</li></ul>
<h3>
net80211 work</h3>
<div><br /></div><div>
Next up - net80211. So, net80211 has basic 11ac bits, even if people think it's not there. It doesn't know about MU-MIMO streams yet but it'll be a basic 11ac AP and STA if the driver and regulatory domain supports it.</div>
<div>
<br /></div>
<div>
However, as I implement more of the ath10k port, I find more and more missing bits that really need to be in net80211.</div><div><br /></div>
<h4>
A-MPDU / A-MSDU de-encapsulation</h4><div><br /></div>
<div>
The hardware does A-MPDU and A-MSDU de-encapsulation in hardware/firmware, pushing up individual decrypted and de-encapsulated frames to the driver. It supports native wifi and 802.3 (ethernet) encapsulation, and right now we only support native wifi. (Note - net80211 supports 802.3 as well; I'll try to get that going once the driver lands.)</div>
<div>
<br /></div>
<div>
I added support to handle decryption offload with the ath10k supplied A-MPDU/A-MSDU frames (where there's no PN/MIC at all, it's all done in firmware/hardware!) so we could get SOME traffic. However, receive throughput just plainly sucked when I last poked at this. I also added A-MSDU offload support where we wouldn't drop the A-MSDU frames with the same receive 802.11 sequence number. However...</div>
<div>
<br /></div>
<div>
It turns out that my mac was doing A-MSDU in A-MPDU in 11ac, and the net80211 receive A-MPDU reordering was faithfully dropping all A-MSDU frames with the same receive 802.11 sequence number. So TCP would just see massive packet loss and drop the throughput in a huge way. Implementing this feature requires buffering all A-MSDU frames in an A-MPDU sub-frame in the reordering queue rather than tossing them, and then reordering them as if they were a single frame.</div>
<div>
<br /></div>
<div>
So I modified the receive reordering logic to reorder queues of mbufs instead of mbufs, and patched things to allow queuing multiple mbufs as long as they were appropriately stamped as being A-MSDUs in a single A-MPDU subframe .. and now the receive traffic rate is where it should be (> 300mbit UDP/TCP.) Phew.</div>
<h4><br /></h4><h4>
U-APSD support</h4><div><br /></div>
<div>
I didn't want to implement full U-APSD support in the Atheros 11abgn driver because it requires a lot of driver work to get it right, but the actual U-APSD negotiation support in net80211 is significantly easier. If the NIC supports U-APSD offload (like ath10k does) then I just have to populate the WME QoS fields appropriately and call into the driver to notify them about U-APSD changes.</div>
<div>
<br /></div>
<div>
Right now net80211 doesn't support the ADD-TS / DEL-TS methods for clients requesting explicit QoS requirements.</div><div><br /></div>
<h4>
Migrating more options to per-VAP state</h4><div><br /></div>
<div>
There are a bunch of net80211 state which was still global rather than per-VAP. It makes sense in the old world - NICs that do things in the driver or net80211 side are driven in software, not in firmware, so things like "the current channel", "short/long preamble", etc are global state. However the later NICs that offload various things into firmware can now begin to do interesting things like background channel switching for scan, background channel switching between STA and P2P-AP / P2P-STA. So a lot of state should be kept per-VAP rather than globally so the "right" flags and IEs are set for a given VAP.</div>
<div>
<br /></div>
<div>
I've started migrating this state into per-VAP fields rather than global, but it showed a second shortcoming - because it was global, we weren't explicitly tracking these things per-channel. Ok, this needs a bit more explanation.</div>
<div>
<br /></div>
<div>
Say you're on a 2GHz channel and you need to determine whether you care about 11n, 11g or 11b clients. If you're only seeing and servicing 11n clients then you should be using the short slot time, short preamble and not require RTS/CTS protection to interoperate with pre-11n clients.</div>
<div>
<br /></div>
<div>
But then an 11g client shows up.</div>
<div>
<br /></div>
<div>
The 11g client doesn't need to interoperate with 11b, only 11n - so it doesn't need RTS/CTS. It can use short preamble and short slot time still. But the 11n client need to interoperate, so <b>it</b> needs to switch protection mode into legacy - and it will do RTS/CTS protection.</div>
<div>
<br /></div>
<div>
But then, an 11b client shows up.</div>
<div>
<br />At this point the 11g protection kicks in; everyone does RTS/CTS protection and long preamble/slot time kicks in.</div>
<div>
<br /></div>
<div>
Now - is this a property of a VAP, or of a channel? Technically speaking, it's the property of a channel. If any VAP on that channel sees an 11b or 11g client, <b>ALL</b> VAPs need to transition to update protection mode.</div>
<div>
<br /></div>
<div>
I migrated all of this to be per-VAP, but I kept the global state for literally all the drivers that currently consume it. The ath10k driver now uses the per-VAP state for the above, greatly simplifying things (and finishing TODO items in the driver!)</div>
<div>
<br /></div><div><br /></div>
<h3>
ath10k changes</h3><div><br /></div>
<div>
And yes, I've been hacking on ath10k too.</div><div><br /></div>
<h4>
Locking issues</h4><div><br /></div>
<div>
I've had a bunch of feedback and pull requests from Bjorn and Geramy pointing out lock ordering / deadlock issues in ath10k. I'm slowly working through them; the straight conversion from Linux to FreeBSD showed the differences in our locking and how/when driver threads run. I will rant about this another day.</div><div><br /></div>
<h4>
Encryption key programming</h4><div><br /></div>
<div>
The encryption key programming is programmed using firmware calls, but net80211 currently expects them to be done synchronously. We can't sleep in the net80211 crypto key updates without changing net80211's locks to all be SX locks (and I honestly think that's a bad solution that papers over non-asynchronous code that honestly should just be made asynchronous.) Anyway, so it and the node updates are done using deferred calls - but this required me to take complete copies of the encryption key contents. It turns out net80211 can pretty quickly recycle the key contents - including the key that is hiding inside the ieee80211_node. This fixed up the key reprogramming and deletion - it was sometimes sending garbage to the firmware. Whoops.</div>
<div>
<br /></div><div><br /></div>
<h3>
What's next?</h3><div><br /></div>
<div>
So what's next? Well, I want to land the ath10k driver! There are still a whole bunch of things to do in both net80211 and the driver before I can do this.</div><div><br /></div>
<h4>
Add 802.11ac channel entries to regdomain.xml</h4><div><br /></div>
<div>
Yes, I added it - but only for FCC. I didn't add them for all the other regulatory domain codes. It's a lot of work because of how this file is implemented and I'd love help here.</div>
<div><br /></div><br />
<h4>
Add MU-MIMO group notification</h4><div><br /></div>
<div>
I'd like to make sure that we can at least support associating to a MU-MIMO AP. I think ath10k does it in firmware but we need to support the IE notifications.</div><div><br /></div>
<h4>
Block traffic from being transmitted during a node creation or key update</h4><div><br /></div>
<div>
Right now net80211 will transmit frames right after adding a node or sending a key update - it assumes the driver is completing it before returning. For software driven NICs like the pre-11ac Atheros chips this holds true, but for everything USB and newer firmware based devices this definitely doesn't hold.</div>
<div>
<br />For ath10k in particular if you try transmitting a frame without a node in firmware the whole transmit path just hangs. Whoops. So I've fixed that so we can't queue a frame if the firmware doesn't know about the node but ...</div>
<div>
<br /></div>
<div>
... net80211 will send the association responses in hostap mode once the node is created. This means the first association response doesn't make it to the associating client. Since net80211 doesn't yet do this traffic buffering, I'll do it in ath10k- I'll buffer frames during a key update and during node addition/deletion to make sure that nothing is sent OR dropped.</div><div><br /></div>
<h4>
Clean up the Linux-y bits</h4><div><br /></div>
<div>
There's a bunch of dead code which we don't need or don't use; as well as some compatibility bits that define Linux mac80211/nl80211 bits that should live in net80211. I'm going to turn these into net80211 methods and remove the Linux-y bits from ath10k. Bjorn's work to make linuxkpi wifi shims can then just translate the calls to the net80211 API bits I'll add, rather than having to roll full wifi methods inside linuxkpi.</div>
<div><br /></div><br />
<h3>
To wrap up ..</h3><div><br /></div>
<div>
.. job changes, relationship changes, having kids, getting a green card, buying a house and paying off old debts from your old hosting company can throw a spanner in the life machine. On the plus side, hacking on FreeBSD and wifi support are fun again and I'm actually able to sleep through the night once more, so ... here goes!</div><div><br /></div><div>If you're interested in helping out, I've been updating the net80211/driver TODO list here: <a href="https://wiki.freebsd.org/WiFi/TodoStuff">https://wiki.freebsd.org/WiFi/TodoStuff</a> . I'd love some help, even on the small things!</div><div><br /></div>
<div>
<br /></div>
Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com13tag:blogger.com,1999:blog-4361733293216582854.post-51078800398064386932019-11-03T20:21:00.001-08:002019-11-03T20:21:24.875-08:00HF phasing noise eliminators, or "wow ok this mostly works"I have a long standing issue with noise from a neighbour down the road that generates super wideband noise on the HF and low VHF bands. It's leaking out into the powerlines. It's pretty amazing.<br />
<br />
Ok, so whilst the FCC goes and figures this out with the house in question, what can I do?<br />
<br />Well, one thing is to use a HF phasing noise eliminator. It's basically a pair of amplifiers and a phase inverting mixer. The "noise" antenna is a low gain antenna that's picking up the noise you want to filter out, but not sensitive enough to actually act as a longer distance HF antenna. You adjust the gain of your main input antenna and the gain of the noise antenna to be mostly the same level and then adjust the phase delay to cancel out the local noise source.<br />
<br />
I bought a kit from Russia (<a href="http://www.ra0sms.ru/">http://www.ra0sms.ru/</a>) and .. well, it worked. Pretty well. I used a discone antenna with a vertical radiator for 25/50MHz operation as my "very deaf" noise reception antenna and mixed in the signal from my HF antennas and .. well, it worked fine on 7MHz and 3.5MHz. I think it's a bit too deaf for 3.5MHz operation though; I bet it'd work better on higher frequencies because my noise antenna can start picking up more of the local area noise.<br />
<br />
What about 1.8MHz? The 160m band?<br />
<br />Well, this is where the fun begins. The short version is - all I heard was lots of AM radio stations where they shouldn't be. The long version is - I am surrounded by super loud (>10kW) AM radio stations that you definitely need a bandpass filter for. The HF radios I have are good enough to filter them out, but the noise eliminator? It's doing all its mixing before there's any band filtering, so it's also mixing in all the AM broadcast band crap.<br />
<br />
So this points out another couple things I need to do - I need to add a little bandpass filter on the noise antenna, and I need a proper HF preselector (ie, a narrow adjustable bandpass filter) on the main radio receiver. That way the transistors doing amplification/mixing in this phaser doesn't get swamped by crap that you're not trying to receive.<br />
<br />(For those who are radio inclined - I'm a few miles from 1100KHz (KFAX) which is a 50KW AM radio station - which shows up as S9+30 or more here. I have a bunch of others that show up as s9+20; so I have a lot of AM noise here..)Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com1tag:blogger.com,1999:blog-4361733293216582854.post-81083415037879162362019-09-27T17:22:00.000-07:002019-09-27T22:11:16.021-07:00Fixing up KA9Q-unix, or "neck deep in 30 year old codebases.."I'll preface this by saying - yes, I'm still neck deep in FreeBSD's wifi stack and 802.11ac support, but it turns out it's slow work to fix 15 year old locking related issues that worked fine on 11abg cards, kinda worked ok on 11n cards, and are terrible for these 11ac cards. I'll .. get there.<br />
<br />
Anyhoo, I've finally been mucking around with AX.25 packet radio. I've been wanting to do this since I was a teenager and found out about its existence, but back in high school and .. well, until a few years ago really .. I didn't have my amateur radio licence. But, now I do, and I've done a bunch of other stuff with a bunch of other radios. The main stumbling block? All my devices are either Apple products or run FreeBSD - and none of them have useful AX.25 stacks. The main stacks of choice these days run on Linux, Windows or are a full hardware TNC.<br />
<br />
So yes, I was avoiding hacking on AX.25 stuff because there wasn't a BSD compatible AX.25 stack. I'm 40 now, leave me be.<br />
<br />
But! A few weeks ago I found that <a href="https://www.reddit.com/r/amateurradio/comments/cuxso3/packet_radio_bbs_in_san_francisco_still_operating/" target="_blank">someone was still running a packet BBS out of San Francisco</a>. And amazingly, his local node ran on FreeBSD! It turns out Jeremy (KK6JJJ) ported both an old copy of KA9Q and N0ARY-BBS to run on FreeBSD! Cool!<br />
<br />
I grabbed my 2m radio (which is already cabled up for digital modes), compiled up his KA9Q port, figured out how to get it to speak to Direwolf, and .. ok. Well, it worked. Kinda.<br />
<br />
Here's my config:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">ax25 mycall CALLSIGN<yourcall>-1</yourcall></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">ax25 version 2</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">ax25 maxframe 7</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">attach asy 127.0.0.1:8001 kissui tnc0 65535 256 1200</span><br />
<br />
.. and it worked. But it wasn't fast. I mean, sure, it's 1200 bps data, but after digging I found some very bad stack behaviour on both KA9Q and N0ARY. So, off I went to learn about AX.25.<br />
<br />
And holy hell, there are some amusing bugs. I'll list the big showstoppers first and then what I think needs to happen next.<br />
<br />
Let's look at the stack behaviour first. So, when doing LAPB over AX.25, there's a bunch of frames with sequence numbers that go out, and then the receiver ACKs the sequence numbers four ways:<br />
<ul>
<li>RR - "roger roger" - yes, I ack everything up to N-1</li>
<li>RNR - I ack everything up to N-1 but I'm full; please stop sending until I send something back to start transmission up again</li>
<li>REJ - I received an invalid or missing sequence number, ACK everything to N-1 and retransmit the rest please</li>
<li>I - this is a data frame which includes both the send and receive sequence numbers. Thus, transmitted data can implicitly ACK received data.</li>
</ul>
<div>
I'd see bursts like this:</div>
<div>
<ul>
<li>N0ARY would send 7 frames</li>
<li>I'd receive them, and send individual RR's for each of them</li>
<li>N0ARY would then send another 7 frames</li>
<li>I'd receive a few, maybe I'd get a CRC error on one or miss something, and send a REJ, followed by getting what I wanted or not and maybe send an RR</li>
<li>N0ARY would then start sending many, many more copies of the same frame window, in a loop</li>
<li>I'd individually ACK/REJ each of these appropriately</li>
<li>.. and it'd stay like this until things eventually caught up.</li>
</ul>
</div>
<div>
<br /></div>
<br />
So, two things were going wrong here.<br />
<br />
Firstly - KA9Q didn't implement the T2 timer in the AX.25 v2.0 spec. T2 is an optional timer which a TNC can use to delay sending responses until it expires, allowing it to batch up sending responses instead of responding (eg RR'ing) each individual frame. Now, since the KISS TNC only sends data and not signaling up to the applications, all the applications can do is queue frames in response to other frames or fire off timers to do things. The KA9Q stack doesn't know that the air is busy receiving more data - only that it received a frame. So, T2 could be used to buffer sending status updates until it expires.<br />
<br />
N0ARY-BBS implements T2 for RR/RNR responses, but not for REJ responses.<br />
<br />
Then, both KA9Q and N0ARY-BBS don't delay sending LAPB frames upon status notifications. Thus, every RR, RNR and REJ that is received may trigger sending whatever is left in the transmit window. Importantly, receiving a REJ will clear the "unack" (unacknowledged) window and force retransmission of everything. If you get a couple of REJ's in a row then it'll try to send multiple sets of the same window out, over and over. If you get an RR and REJ and RR, it may send more data, then the whole window, then more data. It's crazy.<br />
<br />
Finally, there's T1. T1 is the retransmisison timer. Now, transmitting a burst of 7 frames of full length at 1200 baud again takes around 2.2 seconds a frame, so it's around 15.4 seconds for the full burst. If T1 is less than that, then because there's no feedback about when the frames went out - only that you sent them to the TNC - you'll start to try retransmitting things. Now, luckily one can poll the other end using a RR poll frame to ask the other end to respond with its current sequence number - that way each end can re-establish what each others send/receive sequence numbers are. However, these can also be batched up - so whilst you're sending your frames, T1 fires generating another batch of RR's to poke the other side. This in itself isn't such a bad thing, but it does mean the receiver sees a big, long burst of frames followed by a handful of RR polls. Strictly speaking this isn't ideal - you're only supposed to send a single poll and then not poll until you get a response or another timeout.<br />
<br />
So what have I done?<br />
<br />
I'm doing what JNOS2 (another KA9Q port) is doing - I am using T2 for data transmission, RR, RNR and REJ transmission. It's not a pretty solution, but it at least stops the completely pointless retransmission of a lot of wasted data. I've patched both N0ARY and KA9Q to do this, so once KE6JJJ gets a chance to update his BBS and the N0ARY BBS I am hoping that the bad behaviour stops and the BBS becomes useful again for multiple people.<br />
<br />
Ok, so what needs to happen?<br />
<br />
Firstly, we've learnt a lot about networking since the 80s and 90s. AX.25 is kinda part TCP, part IP, so you'd think it should be fine as a timer based protocol. But alas no - it's slow, it's mostly half duplex, and overflowing transmit queues or resending data incorrectly has a real cost. It's better to look at it as a reliable wireless protocol like what 802.11 does, and /not/ as TCP/IP. 802.11 has timers, 802.11 has sequence numbers, and 802.11 tries to provide as reliable a stream as it can. But it doesn't guarantee traffic; if traffic takes too long it'll just time it out and let the upper layer (like TCP) handle the actual guarantees. Now, you kind want the AX.25 LAPB sessions to be as reliable as possible, but this gets to the second point.<br />
<br />
You need to figure out how to be fair between sessions. The KA9Q stacks right now don't schedule packets based on any kind of fairness between LAPB or AX.25 queues. The LAPB code will try to transmit stuff based only on its local window and I guess they treat retransmits as something that signals they need to back off. That's all fine and dandy in theory but in practice at 1200 bps a 7 packet window at 256 bytes a packet is 7*2.2 seconds, or 15.4 seconds. So after 15.4 seconds if the remote side immediately ACKs and you then send another 7 packet burst, noone is going to really get a chance to come in and talk on the BBS.<br />
<br />
So, this needs a couple things.<br />
<br />
Firstly, just because you can transmit a maximum window of 7 doesn't mean you should. If you see the air being busy, maybe you want to back that off a bit to let others get in and talk. Yes, it does mean the channel is being used less efficiently in total for a single session, but now you're allowing other sessions to get airtime and actually interact. Bugs aside, I've managed to keep the N0ARY BBS tied up for minutes at a time squeezing me tens of kilobytes of article content. That's all fine and dandy, but I don't mind if it takes a little longer when there are other users trying to also do stuff.<br />
<br />
Next, the scheduling for LAPB shouldn't just be timers kicking off packet generation into a queue, and then best effort transmission at the KISS TNC. If the AX.25 stack was told about the data link status transitions - ie, between idle, receiving, transmitting and such - then when the air was free the TNC could actually schedule which LAPB session(s) to service next. I've watched T1 (retransmission) and T2 kick over multiple times during someone else downloading data, and when the air is eventually busy an AX.25 node sends <b>multiple copies</b> of both I data payload and S status frames (RR, RNR, REJ, probes, etc.) It's insane. The only reason it's doing this is because it doesn't know the TNC is busy receiving or transmitting and thus those timers don't need to run and traffic doesn't need to be generated. This is how the MAC and PHY layers in 802.11 interoperate. The MAC doesn't queue lots of packets to be sent out when the PHY is ready - the MAC has the work there, and when the PHY signals the air is free and the contention window timer is expired, the MAC signals to get the air and sends its frame. It sends what it can in its given time window and then it stops.<br />
<br />
This means that yes, the KISS TNC popularity is part of the reason AX.25 is inefficient these days. KISS TNCs make it easy to do AX.25 packets, but they make it super easy to do it inefficiently. The direwolf author <a href="https://github.com/wb2osz/direwolf/raw/dev/doc/Why-is-9600-only-twice-as-fast-as-1200.pdf" target="_blank">wrote a paper on this</a> where he compared these techniques to just using the AX.25 stack (and AX.25 2.2 features) which have knowledge of the direwolf physical/radio layer. If these hooks were made available over the KISS TNC interface - and honestly, they'd just be a two byte status notification saying that the TNC is in the { idle, receiving, decoding, transmitting } states - then AX.25 stacks could make much, much smarter decisions about what to transmit and when.<br />
<br />
Finally - wow this whole thing needs per packet compression already. AX.25 version 2.2 introduces a way of negotiating parameters with remote TNCs for supported extensions and so one of my medium term KA9Q/N0ARY goals is to introduce enough version 2.2 support to negotiate SREJ (selective rejection/retransmission) and maybe the window size options, but primarily to add compression. I think SREJ + per packet compression would be the biggest benefits over 1200 and 9600 bps links.<br />
<br />
If you're interested, software repositories are located below. I encourage people to contribute to the KE6JJJ work; I'm just forked off of it (github username erikarn) and I'll be pushing improvements there.<br />
<br />
Oh, and these compile on FreeBSD. KA9Q and direwolf both compile and run on MacOSX but N0ARY-BBS doesn't yet do so. Yes, this does mean you can now do packet radio on FreeBSD and MacOSX.<br />
<br />
<ul>
<li>KA9Q - <a href="https://github.com/ke6jjj/ka9q-unix">https://github.com/ke6jjj/ka9q-unix</a></li>
<li>N0ARY BSS - <a href="https://github.com/ke6jjj/n0ary-bbs">https://github.com/ke6jjj/n0ary-bbs</a></li>
<li>Direwolf - <a href="https://github.com/wb2osz/direwolf">https://github.com/wb2osz/direwolf</a></li>
</ul>
<br />
<br />Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0tag:blogger.com,1999:blog-4361733293216582854.post-90638292382079859782019-06-19T21:15:00.000-07:002019-06-19T21:15:09.842-07:00wow, it's been a whileWell, it has been a while. I've been busy with a new job (Facebook/Oculus) which has taken some adjustment to get to. My new baby girl Alice is now 1 and a half years old and a redhead handful of gremlin energy. Nora (who is almost 5 now) is now inquisitive, playful and talkative. And daddy needs some sleep.<br />
<br />
But, hey, I have been playing with radios and slowly getting back into FreeBSD wifi hackery. So hopefully I will write a few posts here over the next few months to catch up on what I've been doing.<br />
<br />
Field Day 2019 is this weekend. I hope to bring Nora upstairs for a few hours to work some stations with me from my home setup. I'm hoping we can work a handful of modes on different bands during the day.Adrianhttp://www.blogger.com/profile/17496219706861321916noreply@blogger.com0