Jump to content
THIS IS THE TEST SITE OF EUROBRICKS! ×
THIS IS THE TEST SITE OF EUROBRICKS!

Search the Community

Showing results for tags 'dos'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Frontpage, Forum Information and General LEGO Discussion
    • Guest Section - PLEASE READ BEFORE YOU REGISTER!
    • New Member Section - PLEASE READ BEFORE STARTING!
    • Frontpage News
    • Forum Information and Help
    • General LEGO Discussion
  • Themes
    • LEGO Licensed
    • LEGO Star Wars
    • LEGO Historic Themes
    • LEGO Action and Adventure Themes
    • LEGO Pirates
    • LEGO Sci-Fi
    • LEGO Town
    • LEGO Train Tech
    • LEGO Technic, Mindstorms, Model Team and Scale Modeling
    • LEGO Action Figures
    • Special LEGO Themes
  • Special Interests
    • The Military Section
    • Minifig Customisation Workshop
    • Digital LEGO: Tools, Techniques, and Projects
    • Brick Flicks & Comics
    • LEGO Mafia and Role-Play Games
    • LEGO Media and Gaming
  • Eurobricks Community
    • Hello! My name is...
    • LEGO Events and User Groups
    • Buy, Sell, Trade and Finds
    • Community
    • Culture & Multimedia

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


What is favorite LEGO theme? (we need this info to prevent spam)


Which LEGO set did you recently purchase or build?


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Country


Special Tags 1


Special Tags 2


Special Tags 3


Special Tags 4


Special Tags 5


Special Tags 6


Country flag

Found 2 results

  1. Dear All, this post was originally focused more on getting QBASIC (or QuickBASIC, TurboPascal, TurboC, VisualBasic for DOS, and whatever DOS video game you ever played back in the days, and of course all the LEGO DOS software, for e.g. #9750 and #9751), rather than controlling Control Lab with QBASIC, but I turned it around, as getting DOS running on (e.g.) Win11/64 bit is really straight forward, so I made that the second part of this post. 1.) Controlling #9751 with QBASIC This has been posted already briefly in the dedicated EB “Dacta Control Lab Software” thread, however, it very quickly drowned there, as two experienced people (@Bliss and @Gunners TekZone) are discussing/developing some very exciting, really powerful up-to date software that can handle multiple #9751 boxes, and so much more! After 5 pages of discussion, I have totally lost it in that thread, but it all sounds absolutely cool to me. This contribution is more for the ssimple-minded people = me. Some of you may have noticed that I am a very BASIC person. It began in 1982 with the Sinclair ZX81 … and never stopped. Well, if you count VisualBasic6.0 as BASIC. But I am back to the roots; as said, even VB is essentially above my head, I am using it as if it were – well – QBASIC. Here is the QBASIC program I made for #9751 control; either manually or via QBASIC program control. There are a couple of convenience subroutines such as “SetPower O.A + O.B + O.F”, which – guess what – sets the power for outputs A, B, F. It is all for my personal use, but maybe some diehards want to play with is as well – and maybe not. https://bricksafe.com/files/Toastie/lego-interface-b-9751/Q9751_3.BAS https://bricksafe.com/files/Toastie/lego-interface-b-9751/Q9751_3.EXE These may >slightly< change, but the name/link will remain the same. For example, I have no temperature sensor, so I can’t test it, so it is not in the code, but that is a matter of two or so code lines. Here is a (crappy as usual) YT video demonstrating a bit how it works: The list of “convenience subs” is small, but sufficient for my purposes (simple robotics). As all sensor/input data are pre-processed within #9751 and sent 50 times/second encoded as a 19 byte word [16 x 2 bytes composed as 16 bit word: 10 bit A/D value, 2 bit #transitions (high/low or low/high = 1 count), 1 bit open/close, 3 bits rotation clicks/direction + 2 leading bytes and one trailing checksum byte for each sensor – regardless of type attached (none, touch, light, temperature, rotation], there is one array in the program carrying these data all the time: IDproc (Input Data processed). Note that each analog value change may also generate transition and rotation click counts; the latter make only sense when the sensor connected to the input port is “suitable” for such counting. In other words: A touch sensor may generate meaningful transition counts but certainly useless rotation click counts and so on. Output data are stored as well in the array OStatus, but that is usually irrelevant when making user programs. Convenience sub routines for outputs: OutputFwd O.A + … O.H OutputRev O.A [+ … O.H] OutputOn O.A [+ … O.H] OutputStop O.A [+ … O.H], O.BREAK/O.COAST OutputPower O.A + … O.H, 0 … 7 (0 = lowest power level, but not stopped) Inputs: (int) X = IDproc(1 … 8, ANALOG/TRANSITIONS/ROTCLICKS) ClearCounter 1 … 8 (The latter resets the accumulated transition counts and rotation clicks for sensor 1 … 8) Program interaction: UPWaitForAnyKey UPMessage(“Text”) Other than that, the full suite of QBASIC commands and functions is available Here is a short "user program" (something like this is what I use for my robotics stuff = TC robot arms, the dinosaur, LEGO camera stand, and so on): SUB UserProgramB OutputPower O.C + O.D, 0 ‘set lowest output power UPWaitForAnyKey OutputOn O.C + O.D ‘turn outputs on at lowest power level Delay .1 ‘seconds FOR i% = 1 TO 7 ‘ramping up power OutputPower O.C + O.D, i% Delay .1 NEXT i% ClearCounter 8 ‘sensor generating rotation clicks needs to be present on input 8 UPMessage ("Turn rotation sensor until clicks > 20 (or any key)") ‘loop here until rot clicks > 20 or any key is pressed DO: LOOP UNTIL (IDProc(8, ROTCLICKS) > 20) OR LEN(INKEY$) ‘stop motors with coasting motors (outputs are not shorted) OutputStop O.C + O.D, O.COAST END SUB 2.) Getting DOS to run on your modern computer There are many solutions, but one very convenient route is: “Install” (=unzip) DOSBox-X to any folder on your hard disk. At the time of this writing, the latest version is 01.01.2025 – rather current, I’d say. There is a Windows, Linux, MacOS, and DOS version (one can emulate “another” DOS within DOS …): https://dosbox-x.com/ (Links on that webpage point to GitHub direct downloads) Then open the configuration file “dosbox-x.conf” with a text editor (none of the other .conf files) – it is a sheer endless list of configuration entries. I do ignore them all but the serial port settings (around line 900) to change the port mapping; in my case I have USB2Serial/USB2TTL adapters and serial-over-Bluetooth devices mapped to real com ports 1,7,8 (=COM1,2,3 in QBASIC; Windows: The “realports” are those appearing in device manager under COM&LPT): [serial] serial1 = directserial realport:COM1 serial2 = directserial realport:COM7 serial3 = directserial realport:COM9 Change the config.sys equivalents in the [config] = second last section – I only added paths(s) to the existing entry, which are relative to your mounting point: set path = Z:\;Z:\SYSTEM;Z:\BIN;Z:\DOS;Z:\4DOS;Z:\DEBUG;Z:\TEXTUTIL;C:\QB45\LIB\;C:\QB71\BINB;C:\QB71\LIB\; And lastly, change the mounting point for your hard drive in the [autoexec] section; I am just mounting a logical drive C at C:\_DOSBox-X\ [autoexec] # Lines in this section will be run at startup. # You can put your MOUNT lines here. mount C C:\_DOSBox-X\ c: The mounted C drive has DOSBox-X in its own subdirectory, as QBASIC, QuickBASIC, Turbo Pascal and so on and so forth, have. The entire directories listed in Windows explorer are also available in the DOS window that shows up when starting “dosbox-x.exe”; copying/pasting files is just a matter of using Win explorer (or using DOS …): That was it. Deinstallation = deleting the DOSBox-X folder … but why would you want to do that! All the best, Thorsten P.S.: All the programming languages and LEGO programs mentioned and so much more DOS stuff is freely available on the net. These are generally everything else but memory monsters – QBASIC.EXE for example is less than 200 kByte “long”.
  2. Technic Control (TC) from 1986 is - at the very least - absolutely fascinating (to me). It was when TLG wondered into (electronic) robotics ... Evan Koblentz (@evank on EB), his website is http://brickhacks.com/, has assembled the most comprehensive resource available regarding TC - and it still grows ... a wonderful place to be. Thus nothing better to begin this thread with a spoiler … The project idea Building an “autonomously” operating, programmable “robot arm” constructed with original Technic Control (TC) LEGO elements (bricks, plates, 4.5V lamps and motors, interface A, all from 1986 – 1988) and PoweredUp (PUp) LEGO elements (hub, motor; from 2019). Most importantly: TC “interacts” with PUp in a way that TC tells PUp when to move the trolley “left/right” to pre-programmed locations consecutively , while operating “up/down/turn L/R, and grab/release” of the arm by itself. This thus requires 4 motors and TC cannot do that without help, as the interface A has only 3 reversible polarity motor outputs. See below for hardware/software details. What does this combo do? The robot arm [building instructions provided by @alexGS; shown here in a video on his YouTube channel (https://www.youtube.com/watch?v=xLENEktsZdQ)] “quasi-autonomously” exchanges the storage locations of two “parcels”, using three pedestals on a stand and a trolley: (Left) Lord Darth Vader checking on PUp stuff; (right) Captain James T. Kirk checking on TC stuff; (bottom) MK stand + some TC and other LEGO bricks + 4.5/12 rails + 3 pedestals. Trolley: pulled with a “run-around” chain by a PUp medium linear motor on the left (color/distance sensor not used); (back) PUp Technic hub, powered by the permanent ≈ 4.0 V output of interface A using a small DC/DC converter in the hub’s battery box, see below; (top left) interface A powering the three 4.5V motors of the robot arm and the three 4.5V lamps in the base; (top right) ESP32 Dev kit + opto-coupler board connecting to output A of interface A, Arduino serial to parallel converter, RS232 cable to Win11 laptop (not shown); (center) robot arm, design by @AlexGS). Further to the right is the XT (not shown). “Quasi-autonomously” because instead of a LEGO PUp hub or PBrick of any kind, an IBM XT running PCDOS 3.3 and QuickBasic 4.5 is the brain behind the TC hardware – and I simply failed to get the XT moving on the trolley as well :D Why such a weird project? a) I wanted to show that TC can interact with PUp with only modest and cheap 3rd party elements used; b) wanted to use original LEGO TC ABS elements mingled with modern LEGO ABS elements plus some MK ABS elements; c) love to bring together vintage and modern electronics, particularly from TLG as they >never< show(ed) us how to accomplish this, and d) because I am simply running out of space up here in my attic and can’t do much more other than rotating something rather small by 180 degrees on the spot :D Did some remodeling up here lately to accommodate an original IBM XT (this one from 1985) – and these monsters do consume some room. Even worse, in the setup shown in the above figure, for a full 180 degree turn of the arm, it needs to be a) in the upper position, otherwise it crashes into a shelf; and b) the arm also needs to be moved laterally when turning, otherwise it crashes into a pedestal :D Space … the final frontier … Here is a short (and very boring video) of what the robot arm does – it was way more fun to bringing those two LEGO programming worlds together than taking that video. More on that below. (Video does for some reason not load - it does on YouTube: Just click here: https://www.youtube.com/watch?v=-6WI4i-TcYs) LEGO Hardware used One version of the robot arm (grab/release, up/down, turn left/right) is depicted in one of the LEGO Dacta booklets coming with set #1092; however a >much improved< version was provided by @alexGS. I would not have been able (zill!) to build the robot arm without a ton of help from Alex. The turn table’s (the arm is mounted on) instructions are available as building card in Dacta set #1092. The simple trolley I made is pulled back and forth using the small LEGO chain elements and is operated by the LEGO Technic hub and a PUp tacho motor (see below). The trolley runs on dark gray LEGO plastic train rails. And oh boy – the rails are affixed to the base of a stand for the MK Flying Dutchman … for fun I added three LEGO 4.5V lights to the stand’s base – just for show, nothing else. Well, not exactly: It shows that the outputs of #9750 can drive much more than one 4.5V motor each … Up/down, rotation left/right, and grab/release of the arm is done with three #6216 4.5V motors, #9750 interface A, the XT (+ LEGO #9771 ISA bus card) running PCDOS 3.3 and a compiled MS QuickBasic 4.5 (1988) program I wrote for that purpose. So in essence most of the stuff used to build and operate the arm is about 35 years old; the stuff to pull it back and forth is from 2019 onwards. The Technic hub is powered from the permanent 4V DC output of interface A with an additional DC/DC converter: As said, the lateral motion of the robot arm is done with a trolley moving on 4.5/12V type LEGO rails, operated by the linear medium PUp M motor (#88008), hooked up to a 4-port PUp Technic hub #88012. An ESP32 Dev kit board running Legoino is used for controlling the PUp devices; there is also the PUp remote (#88010) for manual trolley operation and PUp program control. I cannot (and don’t want to) get used to the LEGO PoweredUp app. After all, this stupid app >always< crashes, when operating TLG’s very own #88008 motor in tacho (PID) mode – even after TLGs 4+ years of app development … Other electronic hardware employed It turned out that using the ESP32 Dev kit/Legoino hard/software combo was (again) a fortunate approach as I was too dumb to use the LEGO PUp color and distance sensor (#88007) to simply sense light on/off. The TC and PUp brains are thus synchronized via an opto-coupler (4N28, already referenced in this book from 1983, we have to keep it straight on the vintage front ;) http://www.bitsavers.org/components/motorola/_dataBooks/1983_Motorola_Optoelectronics_Device_Data.pdf) hooked up to the ESP32 board, in accord with the interface A electronic layout philosophy, which also uses opto-couplers (2x LTV 487 M; 4 couplers in each chip) for separating the circuitry of the control computer/interface card from the power lines of the interface A. In my setup, one of the 3 motor outputs of the interface A is wired via a bridge rectifier (because forward and reverse need to be sensed) and a 470 Ohm resistor to the photo diode of the 4N28. The photo transistor goes low when the diode is turned on; thus the corresponding ESP32 input is tied to VCC(+3.3V) via a 1kOhm resistor. This little PANT board (I made that PANT thing up of course, Arduino’s have SHIELDS, Pi’s have HATs …) is riding directly on the pins of the ESP board: Total cost here, including the ESP board, is about $15. I used 4.5V wires (#766c96) with 2prong connectors, took off one connector and soldered Dupont connectors to the bare wires, which attach to the corresponding pins on the PANT board (interface A <=> ESP32 connection). See below for some programming hints on that; essentially, the ESP notices even the shortest low-level pulses on its inputs; I simply very briefly turns on/off the corresponding interface A output, so that neither a motor nor a 4.5 light bulb (visibly) notice that at all, but the ESP does. Well the ESP is more than 30 years younger than the other old farts :D The computer running QuickBasic 4.5 (or QBasic 1.1) or TC Logo controls the LEGO interface A. The interface in turn “controls” the LEGO PoweredUp Technic hub. Well, not exactly true: It signals the state of one of its outputs to the ESP32, which runs Cornelius Munz’ simply wonderful Legoino (https://github.com/corneliusmunz/legoino) software, which then provides bidirectional access to PUp devices, i.e., the Technic hub and the PUp remote. The PUp remote is only used for moving the trolley into its starting position and then telling the hub to listen to what the ESP is telling it to do. It can also be used to simulate light events etc. A note on the PUp environment: The tacho motor has a very high rotational resolution on the built-in encoders – way more than the TC encoders, but the principle is exactly the same: With the TC elements, you actually learn how that works; with PUp it is an icon in the app – or some code in Legoino. Nevertheless, the high precision, along with the built-in ramping routine, the speed is going up/down in a very controlled fashion, and results in absolute smooth trolley motion. Software Computer hardware controlling the interface A may be a modern Win11 machine, a semi-vintage machine running Win98 or the like, or a true vintage machine, e.g., an IBM XT, I am using frequently for such experiments. This >35 years range of computers smoothly operating the interface A became possible after Alex paved the road by partly disassembling the original TC Logo software from 1986-89 for PC’s running DOS and creating two new versions: One that does I/O via the parallel port LPT1 (TCLogo_p) and one that does I/O via the serial port COM1 (TCLogo_s). Both DOS executables are provided on his Bricksafe pages (https://bricksafe.com/pages/alexGSofNZ/interface-a-tc-logo). The original TC Logo for IBM PCs running DOS uses a LEGO parallel interface ISA card (#9771) with its own address for I/O. In this EB thread, there is a little documentation on the efforts of Alex and me regarding running TCLogo on modern computers: Why all these efforts? Simply because people like Alex and Evan and most probably many others like to run original vintage LEGO electronic hardware with the original LEGO vintage software. That’s all there is. Running the software alone on a modern computer is not an issue; there are many (DOS) emulators out there, some tailored towards playing original vintage games, others to actually mimic the functionality of a vintage computer. However, modern PCs/laptops don’t have any “true” serial (RS232) or parallel ports anymore – they do almost everything via USB. Nor do they have any means of providing 8-bit ISA bus functionality – at least not at an affordable price – if at all. I am pursuing another route: I want to run QuickBasic 4.5 / QBasic 1.1 in an emulator environment, and write my own BASIC code on a Win11 machine. Then transfer the program to the XT and run the robot arm from that computer. The DOSBox-X emulator is perfectly suited for this task, as it also provides access to COM ports on the host computer (laptop) as per configuration file: serial1 = directserial realport:COM1 COM ports are “created” using e.g. an USB2Serial or USB2TTL adapter; they are showing up as such in device manager. Why not using the XT directly for program development? For one, an XT with 256 kByte memory cannot run QuickBasic 4.5 but surely compiled QuickBasic com/exe files. QBasic 1.1 in turn runs on a 256kByte XT, but cannot compile files; it runs them directly. Furthermore, a laptop is mobile, an XT is not. A modern laptop is quite fast – an XT is not. A modern laptop has a flicker free display, an XT has not … yeah, we got “softer” over the years … and older for sure … The last thing required to operate interface A is a fast enough serial to parallel “converter” to operate interface A through an USB channel into DOSBox-X and further into QuickBasic. This is a very simple task for any Arduino device; even an Arduino Nano can do that. I made such an “interface”: Serial to 8bit parallel, 6 output, 2 input lines, as shown again here: And finally the program codes, most probably full of bugs, but they run smoothly so far; my Bricksafe page is here: https://bricksafe.com/pages/Toastie; direct download links: QuickBasic 4.5/QBasic 1.1 program (9750 control/robot arm program): https://bricksafe.com/files/Toastie/lego-interface-a---9750---9771---tclogo/tc-meets-pup/Q9750_9.BAS Legoino (C++) source code for the trolley (Technic hub + tacho motor + PUp remote): https://bricksafe.com/files/Toastie/lego-interface-a---9750---9771---tclogo/tc-meets-pup/DactaArm_V2.ino Arduino Nano serial to parallel code (C++): https://bricksafe.com/files/Toastie/lego-interface-a---9750---9771---tclogo/program-files-/9750_Parallel2Serial_Interface.ino I am very happy to provide more info on the programs, but I guess I am the only one doing this weird stuff in BASIC … and I just keep it here for future reference. Updates will also go here. All the best, Thorsten
×
×
  • Create New...