Build failure due to implicit declaration of functions
joe ignores fractional part of numeric literals in some locales
JOE 4.7 Released!
Konsole (KDE) and mintty (Cygwin) do not work correctly. Shift-cursor keys cause them to scrollback line at a time. There is an option to turn this off, but then you lose Shift-PgUP and Shift-PgDn scrollback, which I think is bad. Rxvt has non-standard keys, but they are workable. PuTTY's defaults are bad, but at least it now has xterm mode. TeraTerm does nothing with modified cursor keys. Anyway, for 4.7 I've added the standard keys, but also immediately override them with JOE's old bindings for...
I've removed %t from other rc files. I think xfce-terminal has also been fixed so that the notification only happens if the screen contents actually changes, a refresh with same text no longer triggers it.
I've included this fix in JOE github repo. But should I be taking anything else from https://github.com/cmur2/joe-syntax ?
OK, this is now fixed in the github repo. I ended up using your code to find the locale decimal point character. So now: Calculator always expects '.' for decimal point on input. It ignores underscores on input. It no longer prints underscores on output, it uses locale characters instead. Calculator prints numbers in the locale format on the status line. "ins" inserts numbers with '.' for decimal point. This is almost always what you want. New command "insf" inserts numbers formatted in the locale....
Right now there is an in-core database of file positions which is loaded at startup and then updated whenever someone closes a window. So one way to fix this problem is to update the file position part of the state file whenever someone closes a window- basically eliminate the in-core clone of the file positions and have only one global copy of this information. Likewise, when you open a file, the editor would get the most recent file position instead of what it was when the editor was invoked. I'm...
This is now fixed in the github repo.
This should now be fixed in the github repo. Need someone with MAC OS to verify it.
Ah, OK, read too fast. Also, reproducing the bug didn't work for me initially (in Ubuntu 22.04)- I had to run "locale-gen de_DE.UTF-8" first (then it shows up in "locale -k LC_NUMERIC"). Anyway, I see some solutions involving uselocale, but unfortunately it's not universally available. For the number format in the edit buffer, we probably need Ctrl-T options. What often happens with me is that inserted numbers with underscores are not often acceptable. Also, comma is bad news because it's often a...
I'm trying to figure out if using "," in place of "." is a good idea even in locales where that's the norm. I guess the problem I have with it is that this is not done in programming languages so I'm not sure it's a good idea in JOE's "math". Hmm.. well I just tried it in Libre Office and it does use "," in de_DE.utf-8.
Confirmed. There is a bug in usave.c:saver(). Note the comment: / Last UNDOREC which wasn't modified will be changed * to modified. And because this block is * executed after each 'save', there can't be more * than one record which is not modified * 24 Apr 2001, Marx / What the code should do is set the "changed" flag in all undo records, so if you undo after the save it counts as a change. The assumption in the above comment is wrong- there can be multiple "not modified" points in the undo reco...
Nice! Interesting that you got a bad 4017.. But the board has other problem. It cannot run the build in problem (enter 10 then run). I will start a new post. There is a tuning step: you need to find relays that work correctly in the flip-flops by swapping them. There is some text about this in the build guide.
Hi, Why don't you contact me on Tindie- I can send you a replacement U24. Also they are easy to program right on the board if you have the PICKit: buying a blank part and programming your own might be faster if you are not in the USA. Thanks, Joe
Slow Tetris, this is awesome! We need a video :-)
Oh, you are correct, the documentation is wrong. When ROR is set, the input is from A_DATA. I think I originally wanted to rotate the add/and output for more instruction possibilities, but this ends up requiring more relays. The reason is that the condition logic wants inverted carry, but it's not available at the add/and output (but is available in A_DATA). I think I also considered putting the rotate logic in the A_DATA path, but then you wouldn't have access to the carry out from the rotate. The...
jameco has ULN2803A: https://www.jameco.com/z/ULN2803A-Major-Brands-Transistor-Darlington-NPN-50-Volt-0-5-Amp-18-Pin-PDIP_34315.html Amazon.com has them also.
Adafruit has L293, but very expensive: https://www.adafruit.com/product/807 Amazon.com also has them, much cheaper. Just search for L293.
Adafruit has L293, but very exxpensive: https://www.adafruit.com/product/807 Amazon also has them, much cheaper. Just search for L293.
Adafruit has L293, but very exxpensive: https://www.adafruit.com/product/807
jameco has ULN2803A: https://www.jameco.com/z/ULN2803A-Major-Brands-Transistor-Darlington-NPN-50-Volt-0-5-Amp-18-Pin-PDIP_34315.html
L293x (16-bit DIP versions) should work instead of SN754410NE. I specified the SN754410NE because it was cheaper. But I don't see them in stock either. I can't believe these total jellybean ICs are all out..
Well here is the map file: There are 420 bytes free, but they are used by the stack. I don't really know the maximum stack depth. I wish the MCU had more EEPROM space for retaining the program memory when the power is off, though I guess the main flash memory could also be used for this... hmm.. You could add a SPI-RAM chip pretty easily, if you don't mind added wires on the board. BTW, I discovered that optimization is now enabled by default in MPLABX. In MPLAB, the optimizing compiler was not free...
There is only a single port, but it is four bits wide. So, for example, if you write 9 (binary 1001) to the port, bit 0 and bit 3 of it will turn on, and bits 1 and 2 will turn off. You can also send characters to the console serial port with the OUTC instruction.
Nice progress! I would check again the PC FF and 00 test, make sure the PC LEDs turn on and off. This the most likely problem. Next, do you have the serial cable? Try running the program with trace on ("t on" command), we can then compare it with a working system to quickly see what's going on.
If you try FF <step> do you see the PC bit 0 LED blink briefly? If so, it tells you that the 1 is making it to the bit, but the relay is not latching (hold resistor problem). If it does not even blink, then the 1 is not making it there. It could be the capacitor, or the path back to the driver chip.</step> The speed control knob should work when the speed is set to 0. Do you have it set like this?
Yeah, we should make a release.. it's long overdue (I had a bunch of other ambitious changes I wanted to make, but no time). I still need to deal with Ctrl-K Q- some feel strongly that the behavior should be reverted.
Can you verify that the PC actually latches anything? I mean follow these instructions from the assembly instructions (sorry if you did this already, didn't follow the entire thread): "Verify that you can set and clear all PC bits by entering FF then <step>. All PC LEDs should be on. Now enter 00 then <step>. All PC LEDs should be off. If some appear to be stuck on or off, check that the holding resistors are installed properly: R204 and R205.If some relays are still stuck, try swapping the PC bit...
This is a feature! (But definitely confusing). When a memory location contains HALT, the display shows only the low order byte, plus the low order bytes of successive words. HALT generally means that the address contains data instead of an instruction. This way you can watch more than one byte of data on the LED display. The decimal points turn on when it is doing this.
I've not seen this. I had to deal with the relay switching noise, but it caused errors in the 74HC595 shift registers- the microcontrollers always stayed up. Maybe the 5V is having an issue. The 5V current is all from the LEDs- can you make it fail by just entering all 8s, so that all segment are illuminated? Maybe one of the 595 outputs is shorted to ground or something? So when a particular bit is set, it's killing the 5V? Yeah, 12V/4A is more than enough- it works even with 12V / 1.5A.
Just FYI, those edges are not in the design package I send to the fab house. I think the board must be close the panel size, so they just left them on, or something.
Actually I was originally going to allow for more memory- originally I was going to make a PDP-8 clone. But I came to a realization: the machine is slow, so I think in practice you are not going to have patience to run a program that uses any significant amount of memory. Also I wanted to keep the cost down. Maybe one way to make a cheap compiler is to make an assembler that can translate some small MCU (8-bit PIC maybe?) assembly source to relay machine code. Then you can use an existing compiler......
I should say send the mail to jhallen@users.sourceforge.net I thought there was a direct messaging form somewhere, but I can not find it. Also you coud go through eBay or Tindie.
Hi Piet, Message me your address, I'll send you another programmed PIC16F720. Joe
Yes, center post positive.
I got rid of the Ctrl-K X ask before saving.. I hate it. There is a comment in the joerc file on how to add it back.
Revert Ctrl-K X as well..
Use -O1 to save space.
Upgrade to MPLAB X
Upgrade kbddisp project to MPLAB-X
The software is just reporting what it sees the relays doing (so it's not a software problem). I can see that there is a problem with bit 5 of the PC. In both your examples, PC=2x changed to PC=0x. You should try changing PC between FF and 00 (with the keypad) a bunch of times. Most likely the bit 5 relay needs to be swapped with some other relay- it's holding current is probably a little different.
BTW, the buzzword for the LED diffuser seems to be "gel filters". There are many options: https://www.bhphotovideo.com/c/product/43957-REG/Rosco_RS2611_26_Filter_Light.html https://www.amazon.com/Neewer-12-Inches-Transparent-Correction-Different/dp/B01CCIKB5Q/ref=sr_1_3?keywords=lighting+gel+kit&qid=1579449046&sr=8-3 See: https://www.youtube.com/watch?v=AwUirxi9eBg&t=12m31s
Your video is really excellent, and I wasted pretty much all day yesterday binge watching many of your other videos. Your review of Wichit Sirichote's microprocessor kits (http://www.kswichit.com/) was interesting. I've seen them for years, but haven't bought one yet. His keycap solution is interesting, but still not great. Your own solution is nice, but as you say the 3M "print to last" paper is gone. I will investigate custom Lexan stickers... I think the NRE is not too much and they could be included...
Revert ^K Q behavior, change ^K X to query before saving.
Adjust exit message: give proper message when hitting ^K X when there are
Anyway I've made this change in Mercurial, to try it out.
You can also get JOE to avoid using scrolling regions by setting the terminal type to ANSI instead of XTERM or VT100, as in: TERM=ansi joe myfile It would be better if Microsoft fixes their terminal emulator, for sure this will break other programs.
I've been thinking about this issue again, starting to agree with Diego. Maybe Ctrl-K Q behavior should be reverted and Ctrl-K X changed to ask before saving, as with ^X in "JPICO". This would certainly be safer, but I'm unsure of the outcry of changing ^K X to ^K X Y.
Hi Vinh, Try setting the clock speed low, "FREQ 2" or something. Now try to "FF" and <step>. Do you see the PC bit 2 temporarily being set? I mean do you see the LED turn on and the turn back off?</step> If you never see the LED turn on, it's got to be some kind of wiring problem. It should be slow enough that you can trace the signal back to the peripheral driver with a meter. If you do see the LED turn on, but it won't stay on, then either the holding resistor is not connected (unlikely), or you...
Update link
Availability notice.
Include .hex files
Update
Lyle Bickley's fixes: print label only lines in asm.c and accept newer binary format in sim.c
Wow, cool! Someone from Cupertino did just buy one :-) I found it in this live stream also: https://www.youtube.com/watch?v=mWGjv5l_qZc At 1:04:03
If the instruction at the current PC (or its operands) is modified during download or assembly, then the relays will click to keep the CPU up to date with the memory contents. I did this so that the LEDs would always match the memory.
So there is no guarantee that the relays will work at the higher clock frequencies. They are provided so that you can attempt to overclock.
ROR works like this in order to support multi-precision rotate. Suppose you have a 32-bit value you want to shift right: you can do this: tmp skip 4 clc ror tmp+0 ror tmp+1 ror tmp+2 ror tmp+3
We did drop %t by default with JOE keybinding. I see we still have it for jstar, this needs to be fixed. That's kind of funny with xfce-terminal, I'll have to try it. It's true that there is a background redraw every second, I'll have to rethink this.
Yeah, I've been toying with the idea of modifying JOE's filename syntax. So right now you can say: joe foo,100,100 to open a file starting at offset 100, but only edit 100 characters. This leads to the need to have escape sequences (so you can say \, to get comma). So instead this would be switched to the saner: joe -start 100 -size 100 foo You still need an escape introducer because a filename might start with -. But we have "--" for that. Anyway, it's weird because to be consistent, this syntax...
I posted a link to this to Hacker News: https://news.ycombinator.com/item?id=19489078
Dag, This is awesome! You have certainly mastered relay computer assembly language :-) Joe (The latest set of PCBs just arrived, so I'm about to refresh the eBay and Tindie ads. The price from the Chinese supplier doubled- maybe a consequence of the trade war).
I recommend a 2A supply. It uses around 1.25 A, but you want some headroom in case you use 12 V for external I/O (there are terminals for this). Thanks, Joe On Sun, Mar 3, 2019 at 11:15 AM Paul Schmidt paulschmidt@users.sourceforge.net wrote: I am starting to assemble the parts to build the Relay Computer, and would like to know in advance what the power supply specifications are (or need to be). I already know that I need a supply at 12VDC regulated, with a 5.5mm barrel plug, but I don't know the...
I'm worried about the peripheral driver ICs (which use bipolar darlington drivers): they do not drive all of the way to ground, but instead to around 1V (it's the collector saturation voltage of two transistors). 1V is a higher fraction of 5V than it is with 12V, so I'm worried the drivers will not be able turn the relays off. So the PC might increment (because the relays do drive all of the way to ground), but might not be loadable. I do wish MOSFET driver IC which are pin compatible with the ULN2803...
Update news
Close stdin if we are copying for a pipeline. This way the feeding program
Use joe_read/joe_write for piping into JOE (fixes big where window resize
It's now fixed. The easiest fix was to use a pipe instead of tty/pty pair. (tty/pty can be binary safe by disabling opost, but it's a pain to mess with the termio settings). Also I lied about running /bin/cat- it did not do this. I was misled by some old code (now deleted).
Update NEWS.
Don't reclose stderr
Use pipe instead of pty/tty for piping into JOE, to make it binary clean.
Oh yeah, what am I talking about. It's going though a tty/pty pair and onlcr is set. I'll continue to work on it since I agree this should be binary safe. The Ctrl-C you see is another bug.
This is now fixed.
Fix bug where 'New File' was displayed in "joe -"
mouse mode by default?
So when you pipe data into JOE, it runs '/bin/sh -c /bin/cat' as a background process to read the data from pipe. This allows the editor to run in case you do something like this: while true; do echo hi; sleep 1; done | joe It also allows you to kill the pipe with Ctrl-C (but you have to move cursor off of last line of buffer).
If you do: echo foo | joe "New File" will not show up... JOE only says "New File" if you supply a name. On the other hand, '-' has a special meaning when you exit the editor. If the buffer is named '-', it is written to the output on exit so that this will work: echo foo | joe - >newfile Also if you type: echo foo | joe test "foo" is appended to existing file test.
This is fixed in the latest check-in. Note that you will also get the CR (0x0D) from the echo because there is no '-n'. I'm wondering if there should be an option to enable the old way.. perhaps there are cases where we want CR translated to LF on input.
Don't interpret input data when JOE is used in a pipe.
For most of the relays it doesn't matter much: they need to have 12V coil, 720 - 960 ohms, 2A contacts. The main risk is whether or not they all work (in case these cheap relays don't have a good final test). For the 13 holding relays, the main criteria is manufacturing consitency, so that the holding current is consistent. Take a look at the end of this: http://relaysbc.sourceforge.net/devlog.html The holding resistors can be adjusted to match the relays, but the relays need to be consistent.
EEVBLOG had an episode on a Chinese distributor LCSC.COM. I notice they have ultra cheap DIP relays, would be interesting to try them: https://lcsc.com/product-detail/Relays_HFD27-012-S_C13466.html
Surely shared NFS home causes problems like this for many other programs (like user's personal bin/ directory?), so I'm wondering if there is an OS solution... I see one solution here: https://superuser.com/questions/211792/how-to-deal-with-shared-home-directory-on-linux Possibly we could modify JOE to look for ".joerc-4.6" instead of ".joerc". I'd rather have something like this than requiring the syntax to be backward compatible forever. At some point the rc syntax needs revamping anyway.
There is a hacker news post right now about GUI pop-ups with Cancel and OK. Should OK be on the left or right?
It happens when I have some text I want to keep selected, but can't temporarily open a window and close it with Ctrl-C without also dismissing the highlighting. I suppose it's rare, and I was used to hitting ^K B ^K K to dismisss, which I know annoys people.
This was changed for potential new users of JOE, so that we can have a single conventional exit command shown on the startup line. I don't like it either, but I use ^C for quitting and I did not want to change ^K X to ask before overwriting. There has not been a big outcry, but if more people hate it I'll change it back. Another change from the same time is that now ^C dismisses the selection highlighting. This has started to annoy me, so I've been reconsidering it.
Awesome! Yes, boards have been available on the Tindie store and I just restarted the eBay listing.
Clean up editor startup so that -mnew and -mold macros have fewer problems.
Update TODO file.
Branch for 4.x bug fixes. Major new features will go into default for
Anyway I'm marking this closed. There is not much JOE can do if the character widths of the font used by the terminal emulator do not match widths specified in EastAsianWidth.txt.
display corruption on many Unicode characters
No update on this one, so I'm closing it.
uses wrong locale charmap
built-in build command
This was fixed.
This was fixed.
Two shell windows are opened on "make"