evank Posted August 11 Posted August 11 17 minutes ago, Toastie said: Ordered more ESP32s - fried one just yesterday - poor thing. @evank BASIC! Never heard of that! And I thought these days were gone. "Back then" in 1990, I programmed an 8052AH-BASIC microcontroller with some peripherals I made during my PhD work to automatically calculate resulting gas concentrations from reactant gas pressure drops in known volumes. The outflows form several pressure-monitored glass flasks were directed into a fast flow discharge system for kinetics studies. People really liked that, as they were not "tied" anymore to the fairly large experimental setup holding a stopwatch in one hand and a calculator in the other ... The good old BASIC days ... Best Thorsten Do you byte when I mov? Best Thorsten Excuse me, a byte. Quote
Bliss Posted August 11 Posted August 11 (edited) 6 hours ago, Toastie said: The good old BASIC days ... And if you look at Annex32 Help documentation, It can do so much more... It can bring a lot more features to an Interface A project... https://www.cicciocb.com/annex32help/V2.9925 https://cicciocb.com/ It supports Serial Comm (2 ports), BLE (Bluetooth Low Energy), PWM, OLED displays, TFT Displays, TouchScreen, IR Tx Rx, MQTT (to interface with your home automation, sky's the limit), ESPNOW to communicate inter-ESP (so many int.A's autonomous program can talk to each others through wifi). Etc... I think some people can play for a while with this ESP32 BASIC on steroids and their INT.A . Edited August 12 by Bliss Quote
amine Posted August 12 Posted August 12 (edited) 14 hours ago, Bliss said: Apparently Vice can redirect C64 user port to the host PC Serial virtual COM port... So it might be possible to connect Vice C64 emulator running Lego Legacy software to an interface A with an ESP32/Arduino Bit bang bridge. I doubt TC Connect can do Bit Bang protocol as it has its own protocol I think. But @Toastie/ @maehw Arduino bridge, or my Arduino/ESP32 bridge, do the bit bang protocol. I'm saying this but have not tried. That would be amazing to have for both VICE "C64 "and BEM "BBC" interface A support. Edited August 12 by amine Quote
evank Posted August 17 Posted August 17 (edited) I'm home from Brickfair Baltimore. The two-day show went well. Extended play of my Simon game revealed a memory leak in my code, which I fixed with help from Gemini. Also, one of the touch sensors stopped springing back. Fortunately a colleague had convinced me to design a quick-release system for the sensors, considering that very possibility that one might crap out. I swapped in a fresh sensor (my last one!) and that problem was solved. The public reacted with overwhelming positive comments. Everyone knew how to play or they learned very quickly. I was afraid the old Radio Shack speaker might be too loud. I realized it was only too loud in the privacy of my home. It was difficult to hear in the crowded Lego convention! I should have acquired an amplifier. My next show is in suburban Philadelphia this fall. I'm going to try and have a different model ready, but I'll keep Simon assembled just in case. Perhaps next time I'll bring it with my laptop and two USB-C bridges instead of an Apple II, just rewriting the code for GWBASIC. Here's a not-so-good picture of my table this weekend. I took it Friday during setup hours. https://drive.google.com/file/d/1_5K74axQqZABK2kXQcAzpDQY0GN9PKG-/view?usp=sharing Edited August 17 by evank Quote
Toastie Posted August 17 Author Posted August 17 (edited) Hi Evan, very good to hear that it all went well!!! I was thinking of you (OK, as if this makes any difference for your show ...) 17 hours ago, evank said: The public reacted with overwhelming positive comments. That is the reward for good and hard work! Congratulations - you have really earned it. Man, how I love, what's on the screen - this is the real thing. Speaking of which: 17 hours ago, evank said: Perhaps next time I'll bring it with my laptop and two USB-C bridges instead of an Apple II I really don't know. Very good for development, very good for travelling, but I believe you'll need maybe much more time to "convince" people that this is all "real" - as in ancient? Not only the LEGO stuff, but everything on the computer side as well? On the other hand, running your authentic GWBASIC (hey, try QuickBasic!) in the DOXBox-X emulator in full screen mode may work as well. Hmm. If I were attending, the Apple would catch my attention and then the LEGO. As you are on LEGO shows, this will certainly be the other way around - so - yes, the "modern HW approach" could work as well! Once again: Very well done! All the best Thorsten On 8/12/2026 at 1:38 AM, Bliss said: I think some people can play for a while with this ESP32 BASIC on steroids and their INT.A ESPs have arrived, the frenzy may begin :D Edited August 17 by Toastie Quote
amine Posted Tuesday at 09:48 AM Posted Tuesday at 09:48 AM (edited) https://www.retrocomputing.dk/about we need to get in touch with him Edited Tuesday at 10:01 AM by amine Quote
Toastie Posted Tuesday at 02:59 PM Author Posted Tuesday at 02:59 PM @amine - I agree! Did you contact him? Totally unrelated - do any of you guys follow the YT channel of Dave Plummer (Dave's Garage)? This is a really cool channel, he was with Microsoft back in the days. His tutorials and other videos are just mind-blowing. (OK, they blow my mind ...) This is for the elderly in this thread: Ir is as here were 1:1 describing my early computer years in Northern Germany (I had to download the transcript of this video - it is too good to just see or hear it. I reformatted it by hand and not ChatGPT ): He talks a lot about BASIC, @evank! Best Thorsten Quote
amine Posted Tuesday at 04:53 PM Posted Tuesday at 04:53 PM 1 hour ago, Toastie said: @amine - I agree! Did you contact him? Totally unrelated - do any of you guys follow the YT channel of Dave Plummer (Dave's Garage)? This is a really cool channel, he was with Microsoft back in the days. His tutorials and other videos are just mind-blowing. (OK, they blow my mind ...) This is for the elderly in this thread: Ir is as here were 1:1 describing my early computer years in Northern Germany (I had to download the transcript of this video - it is too good to just see or hear it. I reformatted it by hand and not ChatGPT ): He talks a lot about BASIC, @evank! Best Thorsten Yes he told me is out of the Lego hobby and want to leave all his stuff including a C64 cable to somenone serious . Quote
evank Posted Tuesday at 05:44 PM Posted Tuesday at 05:44 PM If he was in the US then I'd be all over it .... but he's in Europe and I already have the original Lego Commodore cable. :) @Toastie I think you should rescue that collection. Quote
Toastie Posted Tuesday at 05:47 PM Author Posted Tuesday at 05:47 PM 2 minutes ago, evank said: I think you should rescue that collection. Well I believe @amine is already all over it, right? He is also in Europe ... Best Thorsten Quote
amine Posted Tuesday at 05:59 PM Posted Tuesday at 05:59 PM (edited) 14 minutes ago, Toastie said: Well I believe @amine is already all over it, right? He is also in Europe ... Best Thorsten When he said "Serious" it is an european way to estimate the number of zeros, and there are three of them.But go ahead I dont have C64 anyway. Edited Tuesday at 06:02 PM by amine Quote
evank Posted Tuesday at 06:52 PM Posted Tuesday at 06:52 PM That wording applies in the US too. Quote
Toastie Posted Tuesday at 07:23 PM Author Posted Tuesday at 07:23 PM (edited) 1 hour ago, amine said: But go ahead I dont have C64 anyway. Aha! I am a nerd - I don't know such serious terms. Well, in binary system, even with just two trailing zeros, the financial oversight committee here would be very nervous. Spoiler I just spent €330 on a used Shimano e8000 motor for my ebike. My old e8000 broke down after 13600 km - it was a used one as well. So whatever the mileage on it was befire, 13k+ km is totally OK! Plus I am riding quite the gravel trails to work and climb some hills to the ebony towers of my university. 5 years ago the bike came with an e7000 - which was just crap, and Shimano replaced them all for free. Well, my e7000 died of course four months after warranty expiry. The usual stuff. So I replaced that one with the used (compatible) e8000. And it made the +13600 km. I tried for two days fixing the latter - it had multiple issues. Had another one for replacement parts, which I got for free. Mechanically, everything was fine after changing a couple of gears, but I simply could not fix the electronics - SMDs all over the place, no real diagnosis stuff at hands. Display error code diagnosis is a dead end, when it shows the dreaded "Shimano e010" error ... same thing as I black screen on a C64. Difference: I can solder C64 replacement parts ... So, today came the new used e8000 with 6045 km on it. And: It runs as if it never really ran ... silently, happily With three trailing zeros - over and out. Well, I have a C64, know how to fix it, have a working 1541, and the SD2IEC (internal) ... and three Int.As. No, I am not serious Best Thorsten Forgot: And made "The Cable" for about $10. Edited Tuesday at 07:24 PM by Toastie Quote
Toastie Posted Wednesday at 07:42 PM Author Posted Wednesday at 07:42 PM (edited) Here we go again: Final version of my "9750 ESP-Traveller" interface for Interface A :D As my 9570 Traveller (Arduino Nano based), see above, this one has also the miniature 8 bit LED board soldered to it. I also added one of these 2x10 pin boxed header (or whatever they are called, Google came up with "tub plug", as they are called "Wannenstecker" in German ), just because - uhm - I had a couple. Again, 3 pieces plus one wire: Note: Book page with my important scribbling in focus, rest is not. I am a professional photographer. Left: This 2x10 boxed header, solder side. I pulled out pin 4 (+5V on Interface A) as pins 2 and 4 are connected to each other inside Interface A. This way I can bend over pin 5 ("external GND" on Int.A = upstream of opto couplers) to pin 4 (n.c. in Int.A but GND in my Int.A, "internal GND" = downstream of opto couplers) without hassle. Just for fun, I bent the remaining "external GND" pins 7 to 19 on the header so that they make contact with pin 5 and thus pin 4. Pin 1 (external +5V on Int.A) is bent outward, so I can solder a wire to make a connection with +3.3V or the ESP board. Anyone gettin' this [Ghostbusters]. The header pins 2 to 20 are then directly soldered to pins VIN, GND, and the consecutively following GPIOs on the solder sider of the ESP board. The 8 bit LED board directly attaches to the GND and the 8 GPIO pins on the component side of the ESP board. Finally, the +3.3V cable is soldered to the +3.3V pin. In contrast to the Arduino Nano "9750 Traveller" this takes about an hour to make, including bending pins and repeatedly checking the pin orientation: 2x10 header on the solder side, 8-bit LED board on the component side. This mirroring always makes me fuzzy. But it worked on first try. On the other hand: This has an ESP32 under the hood - uhm - well, on board - no - as board. So we have Bluetooth and USB connectivity to DOSBox-X. And thus access to all DOS based serial port programs, including GWBASIC, QBasic, TurboC, and so on and so forth. The best part is: And to @Bliss LEGO Blockly. And here are all the lill interfaces that I have (there are two more ESP boards not shown, serving my permanently installed Int.As): Upper row: All these are compatible with @Bliss' LEGO Blockly as well as the DOSBox-X emulator. The rely on serial data exchange via USB ports, DOSBox-X provides. Any legacy software using the 9771 card (TCLogo, Lines, etc.) or the parallel port won't work; these need to be patched to do so. “9750 Traveler”: Arduino Nano, LED board, no Int.A connectivity. Power form USB. Data via USB. My original Arduino Nano box from page 2/3 of this thread: Discrete LEDs, Int.A connectivity. RS232 connectivity to computer using LONG serial cables; the module on the top is just an optional Bolutek BT to serial adapter. Power from USB. Data via USB, BT, or RS232. Arduino Uno: Optional HC-05 BT module plugged-in. Int.A connectivity. Power from USB, 9V barrel, or 9V 20 pin Int.A connector. Data via USB or BT. ESP32 experimental board (it >has< suffered! Several GPIOs dead, well experiments tend to take toll), directly plugging into Int.A: Power from USB or Int.A. Data via USB or BT. "9750 ESP Traveler": LED board, Int.A connectivity. Power from USB or Int.A. Data via USB or BT. Lower row: The two beautiful interfaces I got from @Mr Hobbles and @diegobaca BrickInterface: Very nice PCB, custom design, w/ LEGO compatible stud holes!!! Fully integrated into @Mr Hobbles software suite. Note: I stole one IR LED to put it onto the ESP experimental board. It still works perfectly well. I have ordered IR LEDs and as soon as they come in, it will have the other LED back!!! Int.A connectivity. Power from USB. TCLogo Connect interface: Again, stunning layout, wonderful box around it!!! Fully integrated into the custom DOSBox-X emulator for this interface. True emulation of the 9771 interface card!!! Int. A connectivity. Power from USB. And lastly: All my interface won't run so smoothly without @diegobaca's help. He showed me how to do the true execution of the 1kHz PWM loop used in TCLogo despite all my tries before!!! Thank you so much Diego for teaching me how that works. All the best Thorsten Edited Wednesday at 07:44 PM by Toastie Quote
ryandesign Posted Thursday at 04:50 PM Posted Thursday at 04:50 PM @evank Congrats on you and your model successfully surviving Brickfair! The Apple II setup looks great. I haven't got my hands on a 9767 card yet, but in pursuit of the most fun I've been studying the schematics and datasheets. I'm left with a couple questions... I wonder if @Toastie or anyone else who's made a compatible interface knows the answers, or if someone who has a 9767 card would be willing to run some tests to find out. 1. How does the +5V power from the computer to Interface A get turned on and off? My assumption is that when the computer is first turned on, there is no power on pins 1&3 of the cable. Is that correct? With no Interface A connected to the card, I assume that this part of the initialization code (replace 7 with the slot number that the card is in) turns on the +5V power on pins 1&3: 10 S=7 : L=49280+S*16 20 POKE L+3,1 : POKE L+1,0 RUN If that's correct, does this turn it off again? POKE L+1,1 Does this turn it off again? POKE L+3,0 When the +5V power is on, does pressing Control-Reset turn the power off? If not, does Open Apple-Control-Reset? 2. Are input and output data stored separately in the 6522 chip? Still with no Interface A connected to the card, and retaining the previously entered program, I'm curious what the output will be after these additions: 30 POKE L+2,255 : POKE L,85 : ?PEEK(L) 40 POKE L+2,0 : ?PEEK(L) 50 POKE L+2,255: ?PEEK(L) 60 POKE L+2,0 : POKE L,170 : POKE L+2,63 : ?PEEK(L) RUN Line 30 sets all 8 lines to be outputs, outputs 85, and prints the output, which should be 85. Line 40 sets all 8 lines to be inputs, and prints the input, which should be 0 since there's nothing connected. Line 50 sets them all to be outputs again and prints the output, and if it's still 85, that would tell me that the output is stored in a separate place from the input. The datasheet makes me think this will be the case. Line 60 sets them all to be inputs, outputs 170, sets the lower 6 lines to be outputs, and prints the output. If output is stored separately from input, I'm expecting to see the lower 6 bits of 170, which would be 42. Thanks! Quote
evank Posted Thursday at 06:14 PM Posted Thursday at 06:14 PM (edited) 1 hour ago, ryandesign said: @evank Congrats on you and your model successfully surviving Brickfair! The Apple II setup looks great. Thanks. I'll reveal a secret ... I've always booted off a real disk, but I recently purchased the A2Pico multicard, configured for USB storage: https://jcm-1.com/product/a2pico/ ... So there was a memory stick hanging off the back of the computer :) and this time the floppy drive was just for show. 1 hour ago, ryandesign said: I haven't got my hands on a 9767 card yet, but in pursuit of the most fun I've been studying the schematics and datasheets. I'm left with a couple questions... I wonder if @Toastie or anyone else who's made a compatible interface knows the answers, or if someone who has a 9767 card would be willing to run some tests to find out. I can do some of these tests, however I still haven't unpacked from Baltimore -- and you're right, @Toastie knows more about the electrical insides. Let me know if you want a real 9767 because I have plenty of them. Although it sounds like you're the kind of person who would rather build your own. :) Edited Thursday at 06:17 PM by evank Quote
Toastie Posted Thursday at 07:13 PM Author Posted Thursday at 07:13 PM (edited) 2 hours ago, ryandesign said: I wonder if @Toastie or anyone else who's made a compatible interface knows the answers, or if someone who has a 9767 card would be willing to run some tests to find out. @ryandesign I don't have the 9767 card, but 9771 for the IBM XT. They are entirely different, of course. The opto couplers in the 9750 box are turned on the moment you turn on the computer/9771, as the card provides external +5V to pin 1 (and 3) and external GND to pin 5 (and 7 - 19) to the 9750 20-pin connector (you really just need pins 1 and 5). They are taken directly from the ISA bus. 9767 uses the 6522 VIA output PA0 to do so. On this Google Drive folder, provided by user David_M in the Applefritter forum (this post), you'll find all you require, I believe: Circuit diagram, gerber file, etc. Evan is also a forum member; his last visit was "one year and two months" ago :D With regard to your other questions, @evank is your man Just one note: Yes, +5V is turned on with a POKE zapping 6522's port PA0, but GND is permanently attached, see diagram. Best Thorsten Edited Thursday at 07:19 PM by Toastie Quote
ryandesign Posted Friday at 12:31 AM Posted Friday at 12:31 AM Thanks @Toastie. I had read about the 9767 Reboot card and its sadly reversed connections earlier in this thread, but I hadn't found its schematic, so thanks for pointing me to that. It does seem very similar to the previous 9767 schematic I found, except for the reversed pins. I'm investigating alternatives to the 6522 part which is why I was hoping for some data on how it actually behaves so I can make sure my board has the same behavior. Quote
evank Posted Friday at 04:51 AM Posted Friday at 04:51 AM 11 hours ago, ryandesign said: @evank Congrats on you and your model successfully surviving Brickfair! The Apple II setup looks great. I haven't got my hands on a 9767 card yet, but in pursuit of the most fun I've been studying the schematics and datasheets. I'm left with a couple questions... I wonder if @Toastie or anyone else who's made a compatible interface knows the answers, or if someone who has a 9767 card would be willing to run some tests to find out. 1. How does the +5V power from the computer to Interface A get turned on and off? My assumption is that when the computer is first turned on, there is no power on pins 1&3 of the cable. Is that correct? With no Interface A connected to the card, I assume that this part of the initialization code (replace 7 with the slot number that the card is in) turns on the +5V power on pins 1&3: 10 S=7 : L=49280+S*16 20 POKE L+3,1 : POKE L+1,0 RUN If that's correct, does this turn it off again? POKE L+1,1 Does this turn it off again? POKE L+3,0 When the +5V power is on, does pressing Control-Reset turn the power off? If not, does Open Apple-Control-Reset? 2. Are input and output data stored separately in the 6522 chip? Still with no Interface A connected to the card, and retaining the previously entered program, I'm curious what the output will be after these additions: 30 POKE L+2,255 : POKE L,85 : ?PEEK(L) 40 POKE L+2,0 : ?PEEK(L) 50 POKE L+2,255: ?PEEK(L) 60 POKE L+2,0 : POKE L,170 : POKE L+2,63 : ?PEEK(L) RUN Line 30 sets all 8 lines to be outputs, outputs 85, and prints the output, which should be 85. Line 40 sets all 8 lines to be inputs, and prints the input, which should be 0 since there's nothing connected. Line 50 sets them all to be outputs again and prints the output, and if it's still 85, that would tell me that the output is stored in a separate place from the input. The datasheet makes me think this will be the case. Line 60 sets them all to be inputs, outputs 170, sets the lower 6 lines to be outputs, and prints the output. If output is stored separately from input, I'm expecting to see the lower 6 bits of 170, which would be 42. Thanks! I'll try some of these experiments this weekend. I found this on my own website (ha!), regarding the POKES required to set up and activate the 9767 card in BASIC: "As explained in the manual, 'This sets up the 6522 registers so that bits 0-5 are output bits, and bits 6-7 are input bits. All I/O is then done through address L.'" Quote
amine Posted Friday at 07:22 AM Posted Friday at 07:22 AM (edited) Do you know that there was existing libraries in Comal and Pascal to actually code the interface A exacly like the arduino libraries today,with user friendly primitives. We should try to find those back or we can also make new ones from scratch. Those libraries are described in the book "Steuern und Regel mit LEGO Lines und dem LEGO TC Controller" Thats a big loss, did someone tried to contact the authors of the book to rescue those programs ? That's really something we want to get back because that makes much easier programming of the Interface for most people. Edited Friday at 07:46 AM by amine Quote
Toastie Posted Friday at 07:58 AM Author Posted Friday at 07:58 AM 27 minutes ago, amine said: Thats a big loss, did someone tried to contact the authors of the book to rescue those programs ? Yes we did. Evan got the book from one of the authors (Albrecht) and scanned it, and I was in touch with him several times. He searched the place for any remaining stuff to no avail. He also asked the other author (his boss at that time), again to no avail. Both are retired, I believe Mödl is not with us anymore. Albecht has moved on - he is much into aviation. I then approached TLG (up to their "archives" in Billund) and asked for that software ("TC Controller", in this case a memory resident DOS program that can a) be accessed through programs and b) provides a simple screen interface for direct control of Interface A. TLG's final reply (after a couple of weeks) was that they can't give us any of the software due to IP issues. >IP issues<, way more than 30 years after they had "made" that stuff. Crazy people, if you ask me. It seems that this TC Controller software for PCs is gone. Best Thorsten P.S.: The long story is somewhere in this thread. Quote
amine Posted Friday at 08:44 AM Posted Friday at 08:44 AM (edited) 2 hours ago, Toastie said: Yes we did. Evan got the book from one of the authors (Albrecht) and scanned it, and I was in touch with him several times. He searched the place for any remaining stuff to no avail. He also asked the other author (his boss at that time), again to no avail. Both are retired, I believe Mödl is not with us anymore. Albecht has moved on - he is much into aviation. I then approached TLG (up to their "archives" in Billund) and asked for that software ("TC Controller", in this case a memory resident DOS program that can a) be accessed through programs and b) provides a simple screen interface for direct control of Interface A. TLG's final reply (after a couple of weeks) was that they can't give us any of the software due to IP issues. >IP issues<, way more than 30 years after they had "made" that stuff. Crazy people, if you ask me. It seems that this TC Controller software for PCs is gone. Best Thorsten P.S.: The long story is somewhere in this thread. We can also make very simple open source libraries for initializing the card for the wait(), the biton() and bitoff() primitives. This should be easy to recreate for Comal, Pascal and maybe C. Edited Friday at 10:29 AM by amine Quote
Phoenix_Saika Posted Friday at 07:41 PM Posted Friday at 07:41 PM On 6/24/2026 at 12:22 AM, alexGS said: I only just realised - reading it - that the content is the same as Make and Program Your Own Robots that I linked to in my post above - already on the archive - and that’s in English I believe the programming things are different, like laying them side-by-side the introduction is different and the drawings that show the cabling of the motors to a board differ as well. The models and instructions are the same however. Quote
Toastie Posted Friday at 09:59 PM Author Posted Friday at 09:59 PM 13 hours ago, amine said: open source libraries for initializing the card for the wait(), the biton() and bitoff() primitives. This should be easy to recreate for Comal, Pascal and maybe C. Hmm - I am not sure, what you want to accomplish. The TC Controller program for the 9771/IBM system is memory resident. You load it, and then it stays there, not visible to you. You can then use the TC Controller extended commands in any of the DOS programming software programs, Pascal, BASIC, C ... once you know the syntax. Libraries is another thing, isn't it? Well 9771 does not need much other than bit on/off. There is no initialization. It just mirrors what showed up on the 8-bit ISA (data) bus when you do a write cycle, and the CPU reads 8-bit data from the ISA bus and thus 9771/9750 status. That is OUT/IN in Comal and Basic, and other simple procedures in C and Pascal. TC Controller however did also the 1 ms interrupt initialization as well as provided a number of further commands. The basic routines like bit on/off don't need a library, do they, this is just OUT with an optional mask. Same with wait, isn't it? Best Thorsten Quote
amine Posted Saturday at 06:06 AM Posted Saturday at 06:06 AM (edited) 9 hours ago, Toastie said: The basic routines like bit on/off don't need a library, do they, this is just OUT with an optional mask. Same with wait, isn't it? Best Thorsten We should have user friendly primitives that the user don't need everytime to rewrite the definition of the wait() or the motoron/offf. Those robotics routines aren't included anywhere in Comal or Pascal. You need to write your own and in the german book many of them are included as examples. That's the robotics library like the talkto in logo we need to make open source. I think the resident program is used in the "Direct mode" I am not sure we need it unless we want to do real time command, a "command center "like program, for real time control. For example with an interface when you can in real time turn on and off the output with a mouse click. What we need are the libraries for our user friendly robotics routines that everyone is gonna use. The library from the Tc controller disk is called LTTCC and contain the warte() " wait() " primitives. We can do our own in less that one hour. But we need make sure we make it opensource standard for everyone on github for example. For example here is the procedure in Comal for the wait(): PROC wait(n) CLOSED ti:=TIMER+n REPEAT UNTIL ti<=TIMER ENDPROC wait And in C from the book: void warte(long unsigned time) { int i, ticontrol 67, ti266, pio_b 97, pio_c; if ((unsigned char) peekb (0xf000,0xfffe) == 0xfc) pio_c = 97; /*AT*/ else /*PC, XT*/ pio_c = 98; outportb(ticontrol,176); for(i=0; i<time; i++) { outportb(ti2,169); outportb(ti2,4); outportb(pio_b, (inport(pio_b)|1)); while((inportb(pio_c)&32) == 0); } } Google AI explanations This is a low-level C function designed for older IBM PC architectures (like the PC/XT and AT). It generates a time delay by interacting directly with the computer's motherboard hardware. HardwareMeaning peekb(0xf000,0xfffe): Checks the BIOS model byte to identify the machine. 0xFC means an IBM AT. ticontrol, ti2: Refers to the 8253/8254 Programmable Interval Timer (PIT). It configures Timer 2, which controls the PC speaker and system timing. pio_b, pio_c: Refers to the 8255 Programmable Peripheral Interface (PPI), used to read the system configuration and toggle hardware lines.while((inportb(pio_c)&32) == 0): Loops until a specific hardware status bit changes. In Comal That delay procedure doesn't exist anywhere in the system library and I don't want to write that everytime. In the book they guide you to write your own libraries.At the end they call it legocml, you need to link it before using it. We only need to retype and translate it ,it is all already written in the book. They already have done the libraries for you in Comal and pascal. Our remaining job is only to translate and upload that on internet. My understanding is that You dont ever need to launch the resident program for being able to code the interface in Pascal or comal if this is what you think. Thats for direct control, like the TC logo command center. You need it if you want to change the output in real time for example. The TC controller disk is supposed to be part of 9760 sets for BBC and C64 I never seen it listed for IBM and that surprise me that it was offered for free as Legolines with that book that is not a Lego product. We have everithing to start the work and with the help of AI it is basically an afternoon job. Edited Saturday at 07:32 AM by amine Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.