2023-01-30 00:06:58 Found a Forth for ARM project on github that shows its inner interpreter: 2023-01-30 00:07:00 .macro NEXT 2023-01-30 00:07:02 ldr r0, [r7] 2023-01-30 00:07:04 add r7, #CELLS 2023-01-30 00:07:06 ldr r1, [r0] 2023-01-30 00:07:08 bx r1 2023-01-30 00:07:10 .endm 2023-01-30 00:07:12 No magic there, of course. 2023-01-30 00:08:22 For my plans I'd need to do a left shift on r0, and then add another register to that before doing the ldr r1, [r0]. 2023-01-30 00:09:32 On x64 I can mop up the shift, the add, and the jump into a single instruction, and don't need the ldr r1, [r0]. 2023-01-30 00:09:44 However, I'm debating about that and need to do some research. 2023-01-30 00:09:54 Focusing only on next, that's clearly a good way to do it. 2023-01-30 00:11:37 When I was planning to have CFA and PFA in one table, I wasn't sure that it wasn't better to do the shift and add explicitly, so that rax actually pointed to the right table entry, because docol will often come next and needs that work again. 2023-01-30 00:12:08 But now that CFA and PFA are in different tables, and possibly with different sizes, it seems more suitable to leave rax just hodling an xt index value. 2023-01-30 00:12:57 I'm still a bit struck at how much this suddenly looks like a byte code interpreter, once that table is introduced. 2023-01-30 00:13:19 It's very much a "2-byte code interpreter." 2023-01-30 00:13:33 And I get to add new 2-byte "instructions" on the fly. 2023-01-30 06:32:44 KipIngram: Making a browser is very achievable, either by leaving out features like CSS and javascript, or by designing an alternative protocol. Of course, the former gets you closer to something you can "actually use" 2023-01-30 06:33:38 I think the right approach is to work in a way that allows you to leave holes for stuff you don't support yet, and a lot of holes will be needed 2023-01-30 06:34:38 Encryption is the big gatekeeper now, though. I think many websites don't work without TLS 2023-01-30 07:07:45 anyone aware if ever existed a forth-like assembler? like '1 2 store; bx add; pop;' 2023-01-30 07:19:31 retro3 had an RPN x86 assembler allowing things like: 2023-01-30 07:19:36 TCODE: IRQ-ON ( n -) 2023-01-30 07:19:36 ECX PUSH, EAX ECX MOV, 2023-01-30 07:21:28 source is part of http://forthworks.com/retro/r/retro3.zip in asm.f 2023-01-30 07:33:06 Looks quite assemblish 2023-01-30 07:35:50 What do you think about pre-ASCII encodings such a Stretch code? 2023-01-30 07:36:05 Other pre-ascii aren't very interesting because they only have subset of ASCII 2023-01-30 07:36:20 that one got 120 printable characters 2023-01-30 07:36:36 It was used on IBM 7030 Stretch machine 2023-01-30 07:43:03 What is there to think about? 2023-01-30 07:49:48 Well, do you think ASCII charset was worse than ideal for instance? 2023-01-30 07:56:06 rendar: yeah quite a few Forths have assembers that look a bit like that 2023-01-30 07:56:41 Stalevar: given the limitations of the day ASCII was about as good as it got 2023-01-30 07:56:56 Stalevar: it was annoying not having international symbols, I guess 2023-01-30 07:57:14 gordonjcp, but 7030 Stretch encoding predates ASCII and got more printable chars 2023-01-30 07:58:22 Stalevar: do you have a link to any information on Stretch encoding? 2023-01-30 07:59:42 Stalevar: I'm lucky, where I am I only really need £ and grave-accented vowels 2023-01-30 08:00:03 Stalevar: but many other languages have characters not even approximateable in ASCII ;-) 2023-01-30 08:03:04 Well, let's consider the encoding for programming only 2023-01-30 08:03:16 Not text, but programming and commenting (in English) 2023-01-30 08:18:06 I think UTF-8 and UTF-32 are all you need really. And ASCII is a subset of UTF-8 for codepoints under 127. You can probably get all those Stretch symbols in unicode. 2023-01-30 08:18:53 If you don't care about compatibility then you might want a simpler encoding, like what colorforth uses (0-9 are 0-9, and then a-z are the next codes, this makes encoding digits in different bases trivial) 2023-01-30 08:19:27 But that's a big if, most of us will care about compatibility to the extent that we want to write source code in ASCII or UTF-8 2023-01-30 08:19:37 And use ASCII/UTF-8 terminals 2023-01-30 08:19:52 Or some other typical codepage 2023-01-30 08:29:38 ± → ≠ ∧ { ↑ } ∨ ∨̴ ↓ ∥ > ≥ < ≤ 2023-01-30 08:29:39 [ ⊃ ] ∘ ← ≡ ¬ ✓ % \ ⋄ # | ! @ ~ 2023-01-30 08:29:39 & + $ = * ( / ) , ; ' " a A b B 2023-01-30 08:30:11 crc, I cared to retype encoding table. whitespace has code of 0x00 2023-01-30 08:30:24 Stalevar: thanks! 2023-01-30 08:30:30 There is one character I didn't find in unicode, though 2023-01-30 08:30:41 Xor as ∨ overstruck with tilde 2023-01-30 08:32:09 Unicode got ⊻ though 2023-01-30 08:32:51 ? is encoded as 0x77 2023-01-30 08:36:57 Symbols for logical operations such as ∨ are problematic though, since this one is easy to confuse with V or v 2023-01-30 08:38:31 crc, disclaimer: I am not sure how accurate this as it was retyped from a scan 2023-01-30 08:39:25 But it's interesting, that digits got case as well as letters, isn't it? 2023-01-30 08:41:08 My use of subscripts is probably a bit inaccurate, they are supposed to be as high as things like acemnorsuvwxz as far as I can see 2023-01-30 08:46:02 Anyway, I think & works much better as logical AND operator, but it would be nice to have dedicated characters for OR and XOR in ASCII, it's lack made it confusing when ^ means XOR or PWR depending on language 2023-01-30 09:00:05 I'm not sure I like the interleaved upper & lowercase 2023-01-30 09:01:42 i like that it got operators for logical NOT, XOR, OR, ≤, ≠ and ≥ 2023-01-30 09:02:12 crc, imagine how much neater programming code would look like if ASCII had something too 2023-01-30 09:02:13 veltas: Yes, if I ever do a browser, it will no doubt be a "reduced functionality" one. 2023-01-30 09:02:40 rendar: That would be the way I'd write a Forth assembler. 2023-01-30 09:03:23 Stalevar: it'd be interesting to see. My code is more verbose though 2023-01-30 09:04:10 Stalevar: I'm just desinging an encoding right now. I'm using "just like ASCII" up through 127, but 128 to 256 will be APL characters and those old "box drawing characters." The remaining items will be either reserved or else control codes for setting color and attributes. 2023-01-30 09:05:28 I posted a picture of it yesterday. 2023-01-30 09:05:49 I'm pretty sure there is an existent APL codepage 2023-01-30 09:05:59 There are several. 2023-01-30 09:06:27 But the idea here is not just to be able to access those chars, which I can already do, but to have a one-byte representation that covers all the stuff I want. 2023-01-30 09:06:56 I added nominal support for utf8 sometime the better part of a year ago. 2023-01-30 09:07:35 And my EXPECT line editing tolerates the presence of color/attribute escape sequences as well. 2023-01-30 09:09:39 But those escape sequences particularly are awfully verbose. 2023-01-30 09:10:41 And they weren't particularly designed to make them detectable from the right. My prior code often moved across the buffer in both directions, but adding those forced me to always start at the far left and move to the right to do any sort of significant modifications. 2023-01-30 09:10:58 Well, to move the cursor across a character to the left. 2023-01-30 09:11:09 utf8 you can recognize fine from the right. 2023-01-30 09:13:09 Here's that image: 2023-01-30 09:13:11 https://imgur.com/a/IqwZUYZ 2023-01-30 09:14:48 For color I'm leaning toward taking one of those empty rows and having eight codes to set background color and eight to set foreground color, which implies an eight-color palette I can assign arbitrary colors to. 2023-01-30 09:17:01 Basic even used 128+ bytes as operators 2023-01-30 09:17:09 Like one byte encodes entire PRINT 2023-01-30 09:17:35 Interesting. I never really learned anything about how it worked internally. 2023-01-30 09:17:43 You have two asterisks 2023-01-30 09:18:12 Oops. Lemme look... 2023-01-30 09:19:03 Hmmm. Maybe I let the alt key up on one of them. I'll check into it. 2023-01-30 09:19:11 There are some duplicates in the APL set, though. 2023-01-30 09:19:20 Isn't there a question mark somewhere down there too? 2023-01-30 09:19:35 Yeah, third from the right on the first APL row. 2023-01-30 09:19:57 Well, I'll decide later whether to purge those or not. 2023-01-30 09:20:24 There's also a duplicate < 2023-01-30 09:20:31 alt-q gives a question mark. 2023-01-30 09:20:52 I just held down the alt key and stepped across the rows. 2023-01-30 09:22:15 I'll probably get rid of the duplicates at some point - I don't really see any benefit in having them. 2023-01-30 09:23:04 I'll still want the thusly labeled keys to make those chars, but I'll have a layer that converts the multi-byte strings the keyboard sends into codes anyway, so I can always use the standard code for those chars. 2023-01-30 09:27:39 I kind of like the way Chuck sets colors on a per-word basis in color forth; I'll probably let those color bytes function as spaces as far as the language is concerned. I'm not really planning to USE the colors in the way he does, but I might use them for readability. 2023-01-30 09:31:16 KipIngram, do you have an APL keyboard? 2023-01-30 09:34:48 No, I'd have to get one. 2023-01-30 09:35:08 I have my notebook keyboard mapped to function as one, but I require a cheatsheet, which makes it kind of not fun. 2023-01-30 09:39:20 I was worried that getting the os to yield that keyboard mapping would be a nightmare, but it turned out not so bad. 2023-01-30 09:39:50 It uses the alt key on the right side as the trigger for those chars. 2023-01-30 09:40:25 Unfortunately that's not a particularly easy key to get comfortable usingm, but at least it works. 2023-01-30 09:41:30 Stalevar: do you remap your control key? I have my capslock functioning as control. 2023-01-30 09:59:40 KipIngram, my Caps does тхис 2023-01-30 10:00:27 I guess for individual keys AltGr is easier to use 2023-01-30 10:01:28 There's some other method of making various characters that involves my printscreen key. 2023-01-30 10:01:35 бут иф ю вант ту врайт ин дифферент скрипт ю шоулд усе а кей ту чаидге лэйаут 2023-01-30 10:01:50 Very pretty. 2023-01-30 10:02:29 I also have a compose key configured to right key between Ctrl and Alt 2023-01-30 10:02:43 It's menu or windows depending on particular keyboard 2023-01-30 10:03:16 Yes, that's my printscreen key. 2023-01-30 10:03:39 I can type things like µSD card or µUSB cable, or say — I can type a long dash 2023-01-30 10:04:11 My alt key location (for hte APL chars) is ok for left hand keys, but it's kind of awkward getting it and other keys on the right side. 2023-01-30 10:05:07 Möşt ḋıàĉřítics too 2023-01-30 10:05:31 slavically decorated 2023-01-30 10:05:44 Use left Windows key for that? 2023-01-30 10:05:47 It's useless anyway 2023-01-30 10:06:03 It's used by Fedora as the "system" key. 2023-01-30 10:06:12 Also menu key is better than print screen for compose 2023-01-30 10:06:15 I have left windows key bound to various cwm actions 2023-01-30 10:06:17 Brings up access to program launch. 2023-01-30 10:06:22 KipIngram, reassign it to right windows key? 2023-01-30 10:06:35 I don't have a right windows key. 2023-01-30 10:06:57 In my system windows key does nothing, though I only have left one, right one is replaced with Menu, which works as Compose 2023-01-30 10:07:08 On the left I have function, ctrl (which is now capslock), windows, and alt. 2023-01-30 10:07:29 One possibility is that I could potentially re-map the left alt to also be an APL shift. 2023-01-30 10:07:33 Then I could use either. 2023-01-30 10:07:40 Use left control as altgr? capslock is quite useless 2023-01-30 10:07:41 I don't seem to use left alt very much. 2023-01-30 10:07:46 ctrl fn widerz alt space alt ctrl leftarrow 2023-01-30 10:07:47 Or I could give up capslock, yes. 2023-01-30 10:08:32 It's not a burning issue yet, but I guess I'll have to deal with it someday. 2023-01-30 10:08:46 I have Fn, Ctrl, LWindows, Alt, Space, Alt, Menu, Ctrl, arrows 2023-01-30 10:08:58 I agree that capslock is borderline useless - never made sense to me that they put it on a big wide easy to hit key. 2023-01-30 10:09:01 Wasteful. 2023-01-30 10:09:17 It is very useful if you need more than one charset 2023-01-30 10:09:23 MAYBE IT MADE MORE SENSE WHEN LOTS OF THINGS WERE WRITTEN LIKE THIS 2023-01-30 10:09:32 Yeah, I guess it would. 2023-01-30 10:09:56 thrig: I haven't needed to do that since anger management. ;-) 2023-01-30 10:09:59 NOPE, IT DIDN'T BECAUSE THE ENCODING DIDN'T HAVE LOWER CASE ANYWAY 2023-01-30 10:10:13 OH THERE"S A MUSIC VIDEO FOR ANGER MANAGEMENT 2023-01-30 10:10:30 And now you were holding Shift, weren't you? 2023-01-30 10:10:36 Because " instead of ' 2023-01-30 10:10:44 (capslock isn't capslock on my keyboard) 2023-01-30 10:10:54 What does it do? 2023-01-30 10:11:02 I forget. esc maybe 2023-01-30 10:11:16 I have mapped it to change layout, it's LED is useful to indicate the current layout 2023-01-30 10:11:48 at $former_job we had stacks and stacks of dell keyboards so I had removed capslock 2023-01-30 10:12:39 Stalevar: My notebook has no numeric keypad. I've thought about mapping in one of my own, using 7890uiojkl somehow. 2023-01-30 10:12:59 - and . are right there handy, so that rounds it out to some degree. 2023-01-30 10:13:01 You probably have it already mapped like that 2023-01-30 10:13:05 try to use Fn 2023-01-30 10:13:14 Really? How would that likely be activated? 2023-01-30 10:13:23 Fn+NumLock 2023-01-30 10:13:36 NumLock would be somewhere like 6 2023-01-30 10:13:37 Don't have anything labeled numlock. 2023-01-30 10:13:44 Ok, lemme poke around. 2023-01-30 10:14:21 AH HERE IT IS https://www.youtube.com/watch?v=trinU3VD1Zo 2023-01-30 10:16:56 Ok, I see some numeric keypad options in Tweaks. 2023-01-30 10:17:03 It's currently set to "disabled." 2023-01-30 10:17:09 Would you like your computer console to be like this? https://upload.wikimedia.org/wikipedia/commons/f/fb/IBM_7094_console2.agr.JPG 2023-01-30 10:17:49 I'll have to do some research on these options. 2023-01-30 10:18:05 Heh heh. 2023-01-30 10:18:11 What tweaks? 2023-01-30 10:18:35 It's a little application I have installed. 2023-01-30 10:18:37 Gnome Tweaks. 2023-01-30 10:19:03 Just shows additional options that aren't present in the standard system settings. 2023-01-30 10:19:08 It probably should work from embedded controller and thus independent from installed OS 2023-01-30 10:19:13 I needed it to get the APL key input on. 2023-01-30 10:19:35 I have edited a layout file in /etc/X11 to get my own layout 2023-01-30 10:20:13 I have plucked all alphabetic keys out of the keyboard and put them back in ABCDEF... order instead of QWERTY... 2023-01-30 10:20:17 Yeah. So far I've gotten what I've wanted with available toosl, but I'm aware that possibility is out there. 2023-01-30 10:20:45 Then it turned out not to be too hard to make them work as they are labeled 2023-01-30 10:21:32 Oh, you don't like QWERTY? 2023-01-30 10:21:41 I took typing in high school, so I got that down early on. 2023-01-30 10:21:57 It would be very hard for me to change at this point. 2023-01-30 10:23:16 KipIngram, nope, it was just a silly joke of sorts 2023-01-30 10:23:41 Ah. 2023-01-30 10:24:00 I found a picture of alphabet keyboard and wanted to reproduce it 2023-01-30 10:31:32 rendar: re forth assemblers, one of the challenges is handling the addressing modes. you can annotate it in the name of the instruction ie "LDA (5),Y" becomes " 5 LDA_IY" but "LDA 5,X" becomes 5 LDA_ABSX" 2023-01-30 10:32:13 I wrote a fairly compact code generator that handled all the addressing modes for mov and the arithmetic instructions. 2023-01-30 10:32:16 I've also seen people use something like MOV#__,__,__ so they don't have to remember what the addressing modes are called 2023-01-30 10:32:24 I don't remember the details, but I was fairly happy with it. 2023-01-30 10:32:31 It might have just done "almost all" of them. 2023-01-30 10:34:00 neat 2023-01-30 10:34:39 The direction I'm going these days, though, is to want to avoid platform specific assembly; I want to design a "virtual layer" that I use to write my primitives. The idea would be to devise a virtual instruction set that "mapped well enough" onto a variety of common processors. 2023-01-30 10:34:46 Then I'd just use that. 2023-01-30 10:35:20 The instructions for that would be short little one-or-two line macros on any particular platform. 2023-01-30 10:35:36 I haven't actually seen a clear path to that yet. 2023-01-30 10:36:02 But I have the general notion that on CISC platforms some of the macros might be empty, since CISC instructions can do more complex things. 2023-01-30 10:36:18 Whereas you'd need "help" from other instructions to do those things on a RISC platform. 2023-01-30 10:37:11 Just to be clear, this is a mythical dream at this point. 2023-01-30 10:37:46 the hero with 3E8 faces 2023-01-30 11:17:59 https://en.wikipedia.org/wiki/Cray_X-MP do you think this would be able to run Firefox if somebody wrote a compile for it? 2023-01-30 11:19:42 128 megabytes of memory suggests most of the time it would be swapping 2023-01-30 11:46:36 I'm looking at how I could use this tick counter to implement a "loop" of tasks on a core. I use a lot of registers, so a context switch isn't exactly cheap. Certainly not as cheap as we often think of Forth as allowing. But on the other hand, if a context switch only occurred every million primitives or so, then that starts to spread the cost pretty thin. 2023-01-30 11:53:31 I was thinking, what if a computer had two Z80 CPU's for example, one being able to disable the other somehow and connected to some ROM while the other one has only RAM. The ROM would have initial bootloader, subroutines to work with display and keyboard and some kind of monitor program. While the other CPU will only run when user allowed 2023-01-30 11:53:56 or it could be any CPU 2023-01-30 11:54:36 the idea is to have a host and guest CPUs, where the host is handling the user interaction, while guest is doing actual computing 2023-01-30 11:55:11 same thing as a control panel, basically 2023-01-30 11:55:43 Except instead of complex wiring it can use a regular display, regular keyboard and another CPU 2023-01-30 11:57:16 Sure; that sounds feasible. 2023-01-30 11:57:43 actually same thing as what I was thinking about Arduino before 2023-01-30 11:58:01 but did anybody try doing that? 2023-01-30 11:58:33 Also the host CPU can be relatively cheap and slow if it only needs to handle a monitor program, while the guest can be much faster 2023-01-30 12:01:34 so the host cpu would be the amd64 and the guest cpu would be the out of band management interface? 2023-01-30 12:03:43 so would the two CPUs be working at the same time or one at a time? 2023-01-30 12:04:24 I guess that would depend on the design, right? 2023-01-30 12:05:54 or one cpu would be on the disk, and another the network card, and another ... 2023-01-30 12:06:38 I'm also thinking about having things structured so that variables in the dictionary really relate only to dictionary management and other "global" things - I'd have what you'd think of as "per thread" variables in the thread memory block. Like a pointer to the threads tib, for example. 2023-01-30 12:06:50 Seems to me I could arrange it so multiple threads could be interpreting. 2023-01-30 12:06:59 They'd each have their own tib and their own output window. 2023-01-30 12:07:07 Obviously, only one could MODIFY the dictionary at a time. 2023-01-30 12:07:14 But I don't see why multiple couldn't use it. 2023-01-30 12:07:34 A thread would start its life without a window or a tib; if it calls QUERY a tib will get allocated. 2023-01-30 12:07:40 Similar for an output window. 2023-01-30 12:08:02 I think the task RAM block could be half a kB to a kB. 2023-01-30 12:08:37 Mostly stack, but a few others variable type things. 2023-01-30 12:15:59 thrig, the other way around 2023-01-30 12:16:10 host CPU is the manager, since it's in control 2023-01-30 12:16:29 guest CPU is actually doing some calculations, so it might be more powerful 2023-01-30 12:16:46 why would you need two CPUs for this though? just curious 2023-01-30 12:17:57 MrMobius, I guess, probably, the host CPU can stop the guest for a moment to do DMA transfers to avoid conflicts, but they can work simultaneously when the user is say typing some command 2023-01-30 12:18:27 So they have independent access to RAM and so on? 2023-01-30 12:18:30 ya having one do DMA in the background could be useful 2023-01-30 12:19:05 KipIngram, I dunno about newer CPUs but when devices did DMA they blocked main CPU on 8080 machines 2023-01-30 12:19:36 Oh, you know, that idea of compiling lines you type to the interpreter (whether you're defining a word or not) and then executin it would make it easy to toss lines of work into the background in a system like I'm picturing. 2023-01-30 12:20:44 I'd need to think some about the syntax of doing that - couldn't be like Linux with the & at the end, since you wouldn't execute that until the previous stuff was finished. 2023-01-30 12:20:45 MrMobius, well, for absolute debugging access, for instance 2023-01-30 12:21:05 the host CPU can access entire memory an can probably coax the guest CPU to show its registers 2023-01-30 12:21:17 Yeah, the idea of having a "reliable" processor that can seize control no matter what would be useful. 2023-01-30 12:21:58 Also ROM-less loading 2023-01-30 12:22:31 The guest CPU will only have RAM, and it can get its bios or whatever supplied by the host from any source 2023-01-30 12:22:44 I haven't quite caught on to the need to have no non-volatile storge in your address space. 2023-01-30 12:22:56 You don't have to use it, even if it's there; it can be just for getting started. 2023-01-30 12:23:04 Just copy stuff out of it and forget it. 2023-01-30 12:23:28 KipIngram, the host CPU can do just that 2023-01-30 12:23:43 copy part of its ROM chip into guest-accessible RAM 2023-01-30 12:23:51 Yes, but the single CPU can too. 2023-01-30 12:23:59 A second CPU isn't needed just for that. 2023-01-30 12:24:03 or it can run it directly from ROM 2023-01-30 12:24:20 Yeah, though often that non-volatile storage is slower. 2023-01-30 12:24:26 So you abandon it later for performance. 2023-01-30 12:24:28 yeah, but what if you want to replace the initial bootloader without opening the computer case? 2023-01-30 12:24:57 and you want to be sure that whatever goes wrong you won't be locked out of your computer 2023-01-30 12:25:12 Even if you have two, one of them has to have non-volatile code in it for your system to get started. 2023-01-30 12:25:23 And if you want to replace that you have to have a commm link to do it with. 2023-01-30 12:25:32 Nothing there is anything that couldn't be done with a single CPU as well. 2023-01-30 12:26:42 KipIngram, how about debugging Coreboot? 2023-01-30 12:27:03 or bios in general 2023-01-30 12:28:10 Anyway, this is already done, though not in a good way. Intel ME or AMD PSP 2023-01-30 12:28:48 A secondary alien CPU having full access to your computer and handling initial boot sequence 2023-01-30 12:29:28 and not-too-good a security record 2023-01-30 12:29:57 Yeah, now a second processor could be a tangible advantage for debugging. 2023-01-30 12:30:00 such as getting the length of the password from that supplied by the user and other such things 2023-01-30 12:30:21 You could have it be "completely secure," so that even if your other processor went off into the weeds it could still take over. 2023-01-30 12:30:25 Stalevar: hmm. cant you do the same debugging on just one CPU? dunno about Z80 specifically but this seems common on other machines 2023-01-30 12:30:54 You could set up some sort of watchdog - if more than a certain length of time passed without the production processor "poking" the reliable processor, it would shut things down. 2023-01-30 12:31:01 And get your attention. 2023-01-30 12:31:26 You might be able to set something like tha tup with an NMI even with one processor, though. 2023-01-30 12:31:44 But now I'm starting to "bend over backwards" - I think that's justification for having two. 2023-01-30 12:31:56 and for switching to pure ROM after boot, you just need a latch to disable the ROM 2023-01-30 12:32:02 I certainly don't mean to be criticizing the very idea. 2023-01-30 12:32:11 Just trying to be clear on what REQUIRES it and what doesn't. 2023-01-30 12:32:26 yes just curious too 2023-01-30 12:32:54 MrMobius, you need another computer and USB3 to USB3 cable, or a super-rare USB2 to USB2 debugging cable 2023-01-30 12:33:00 And there are intereesting things to learn about making multi-processor work well. 2023-01-30 12:33:15 that's how it's done in the wild 2023-01-30 12:33:17 Stalevar: for debugging Z80? 2023-01-30 12:33:24 for debugging Coreboot 2023-01-30 12:33:34 That's an alternative bios for modern PCs 2023-01-30 12:33:46 Stalevar: ah I missed that part. I thought we were talking about two Z80s 2023-01-30 12:33:58 two z80 was my initial idea 2023-01-30 12:34:08 because they are cheap, about $2 each 2023-01-30 12:34:34 so maybe it would be cheaper to use Z80 to handle the front panel for another z80 2023-01-30 12:35:04 the two Z80s part is what I wasnt getting. seems like you could do all of that from one Z80 2023-01-30 12:35:28 MrMobius, yes, but... 2023-01-30 12:35:32 loading from ROM then switching entirely to RAM for example 2023-01-30 12:35:33 two might be easier 2023-01-30 12:35:43 famous last words :) 2023-01-30 12:35:47 What really struck me as the beauty of your idea, Stalevar, was that you were using an easy to set up and make work "control" processor - your Arduino. 2023-01-30 12:36:01 If you're going to make them both Z80's, you lose some of that toolchain availability. 2023-01-30 12:36:20 yeah, but in this case why others didn't do that? 2023-01-30 12:36:20 Adruinos are easy to make fly, so it gives you a very quick path to getting your Z80 doing something. 2023-01-30 12:36:33 I imagine someone has, somewhere out there. 2023-01-30 12:36:49 some people have put an atmega with a 6502 since it would take a lot more hardware than an atmega to replicate GPIO, uart, etc with a 6502 2023-01-30 12:37:48 It is a bit of cheating, to use an MCU which is faster than the CPU 2023-01-30 12:37:57 but it can be done, yeah 2023-01-30 12:38:03 right. might as well just use the MCU at that point 2023-01-30 12:38:09 or the entire thing can be just emulated on ESP32 2023-01-30 12:38:24 I just saw it as a kind of clever labor reduction move. 2023-01-30 12:38:41 But I do see your point. 2023-01-30 12:39:00 Yeah, I hope I can make it work 2023-01-30 12:39:24 By the time I finished thinking about it that day we talked I couldn't see any reason you wouldn't. 2023-01-30 12:40:25 The Z80 offered the right pins to make it work. 2023-01-30 12:40:54 The main issue I saw is that doing this probably precludes using dynamic RAM in your system, or at least precludes using the Z80 to refresh it. 2023-01-30 12:41:29 yeah but 32k SRAM is easier to obtain than 32-64k dram isn't it? 2023-01-30 12:41:55 I guess you could get either, but dynamic ram is often harder to interface. 2023-01-30 12:42:05 Static RAM you just sort of tinkertoy in there and it just works. 2023-01-30 12:42:22 Dynamic ram takes its address in two pieces, which is not how the Z80 gives it to you. 2023-01-30 12:43:06 ive had good luck emulating 6502 with a PIC32 if you are interested in that route 2023-01-30 12:43:45 50MHz 32 bit MIPS core, 64K RAM, 256K flash in DIP28. by far the most powerful thing you can get in DIP which is nice for emulating 2023-01-30 12:45:55 That's a nice little bundle. 2023-01-30 12:46:37 Can it execute code in RAM? 2023-01-30 12:46:45 I know some PICs can't, right? 2023-01-30 12:52:09 PIC32 cab 2023-01-30 12:52:12 can 2023-01-30 12:52:35 also it's MIPS for better or worse. I personally love having a real ISA in an MCU. 2023-01-30 13:00:21 Nifty. I may have to take a look at that sometime - sounds like it would be capable of a lot. 2023-01-30 13:02:38 Wow, I see some of those for a buck fifty. 2023-01-30 13:03:45 Digikey isn't showing me any in DIP. 2023-01-30 13:04:04 Oh, there it is. 2023-01-30 13:04:23 Cheapest of those is $2.38. 2023-01-30 13:05:10 KipIngram: shorturl.at/nvWX4 2023-01-30 13:05:25 The 256k / 64k ones are more like $5. 2023-01-30 13:05:50 10 A/D converters. 2023-01-30 13:06:23 ttps://www.digikey.com/en/products/detail/microchip-technology/PIC32MX270F256B-50I-SP/4902626 2023-01-30 13:06:48 What do you program its flash with? 2023-01-30 13:07:20 I assume it can re-program its own flash, once you have it up on its feet? 2023-01-30 13:08:08 ya the nicest one is more expensive 2023-01-30 13:08:36 I have a PICKIT4 which can also program atmel chips 2023-01-30 13:08:44 I think there are plans online for DIY programmers 2023-01-30 13:08:52 KipIngram: you can use an arduino as the programmer 2023-01-30 13:08:58 they also have examples of a bunch of different bootloaders 2023-01-30 13:10:32 the C compiler they offer disables O3 and Os optimizations unless you pay $900 but it's just GCC under the hood. I was able to compile an object file with MIPS GCC with position independent code off and drag and drop it into a project as a library then call it 2023-01-30 13:10:33 Looks quite interesting. 2023-01-30 13:11:32 ACTION would disable those optimizations anyway when targetting MCUs 2023-01-30 13:11:57 By the way, one shortcoming of my latest thinking, because I have to split that table into two tables, is that even primitives you added to the system later would have to take a record in the PFA table, even though they wouldn't use it. 2023-01-30 13:12:05 Because the index needs to work for both tables. 2023-01-30 13:12:07 But... 2023-01-30 13:12:23 For built in primitives, I could put them first in the CFA table and give them no PFA table entry. 2023-01-30 13:12:39 Then point the PFA table pointer somewhere down below the start of the table, so that the indexing "worked out.' 2023-01-30 13:13:02 Primitives added later would have to advance through both tables, but at least the built-ins wouldn't carry that cost. 2023-01-30 13:13:19 And I probably won't be adding TOO many primitives. 2023-01-30 13:14:25 If I were putting such a system on that PIC, I'd probably merge the tables, which would solve that problem. 2023-01-30 13:16:21 The main benefit of that tabular approach, though, is to allow 16-bit xts to span a much larger system image size; with just 64k of RAM that would become a moot point. 2023-01-30 13:20:13 Looks like that guy has 19 I/O pins; that's pretty good for a 28-pin package. 2023-01-30 13:22:19 Built-in optional pull ups/downs on the intput pins. 2023-01-30 13:22:55 ya not bad 2023-01-30 13:23:04 I think the 270 has USB and the 170 has more GPIO 2023-01-30 13:23:06 iirc 2023-01-30 13:23:08 Controllable open drain on the outputs. 2023-01-30 13:23:25 USB would always be handy, but nice if you can go either way. 2023-01-30 13:24:13 also re -Os optimization, it switches to a 16 bit encoding like ARM Cortex M instead of the default 32 bit encoding. supposedly 40% smaller without much loss of speed 2023-01-30 13:27:59 Nice. 2023-01-30 13:30:43 I'm happy to know about this one. 2023-01-30 13:31:21 MrMobius: makes me wonder how much better a straight 16-bit ARM microcontroller would be 2023-01-30 13:35:01 gordonjcp: what do you mean? 2023-01-30 13:36:18 That PIC32 would be a nice way to interface a few of these: 2023-01-30 13:36:20 https://www.digikey.com/en/products/detail/bourns-inc/PEC12R-4215F-N0024/6153387 2023-01-30 13:36:33 Get generic control knobs you could use for anything. 2023-01-30 13:36:57 I noticed that the inputs can be configured to interrupt on change; use a couple of those on the phase inputs from that encoder, and the software would keep up with things. 2023-01-30 13:37:09 MrMobius: well, imagine if you could make something like the original ARM2 core in an MCU with modern processes 2023-01-30 13:37:17 And that guy's only a $1.25, single unit. 2023-01-30 13:37:25 MrMobius: it'd use so little power 2023-01-30 13:38:11 gordonjcp: you mean like MSP430? :P 2023-01-30 13:38:31 MrMobius: but then, since so many things can be done using just Thumb instructions, why not a Thumb-only ARM arch? 2023-01-30 13:38:36 MrMobius: MSP430 is a DEC J11 2023-01-30 13:38:52 I'm disappointed that it doesn't have ODT in ROM 2023-01-30 13:38:52 gordonjcp: the embedded ARMs are Thumb-only 2023-01-30 13:39:05 embedded in what sense? 2023-01-30 13:39:27 I think all of the Cortex M parts are Thumb only 2023-01-30 13:39:42 not sure about that 2023-01-30 13:39:55 I'm pretty sure things like STM32F103 are 32-bit 2023-01-30 13:40:01 they can do Thumb 2023-01-30 13:40:28 32-bit refers to the register size. all of the Cortex M have 32 bit registers. Thumb just means 16-bit instructions 2023-01-30 13:40:55 yes 2023-01-30 13:41:00 I dont think STM32F103 can use the 32-bt instruction encoding 2023-01-30 13:41:58 hah, you're right 2023-01-30 13:48:39 ye ARMing yerselves? 2023-01-30 13:49:16 yeah, I know an ACORNy joke. 2023-01-30 13:53:16 Hmmm. Now I'm picturing a little "universal adjustment control" that I could use for anything that called for that sort of thing. 2023-01-30 13:53:32 A rotary knob with an encoder, a momentary contact pushbutton, and an LCD/LED. 2023-01-30 13:53:50 It would track some number of values internally. 2023-01-30 13:54:20 The momentary pushbutton would enable a mode where the knob scrolled through the list of quantities; the primary mode would let the knob adjust the selected quantity. 2023-01-30 13:54:48 Maybe a second pushbutton thta let you step through per-pulse adjustment step, so you get coarse and fine control. 2023-01-30 13:54:49 what sort of encoder? pot fed into adc? quadrature encoder using slits or transparency printed with lines? ac resolvers? 2023-01-30 13:54:58 https://www.digikey.com/en/products/detail/bourns-inc/PEC12R-4215F-N0024/6153387 2023-01-30 13:55:15 Quadrature. 2023-01-30 13:55:28 Run it into a couple of the inputs on that PIC MrMobius brought up. 2023-01-30 13:56:03 Or one of its cheaper siblings - you wouldn't really need a powerhouse for this work. 2023-01-30 13:56:18 Other parts of whatever gadget it was in would query for the values over serial. 2023-01-30 13:57:03 Ideally it would be an LCD that would do enough alphanumerics for you to label the selected quantity and show it's value. 2023-01-30 13:57:06 ah, right. iirc there are two input pins that you can set for causing interrupts on change or even to an internal hardware updown counter 2023-01-30 13:57:20 Yes, and the order in which they toggle tells you what way you're turning. 2023-01-30 13:57:36 A up, B up, A down, B down, or the other. 2023-01-30 13:57:36 some pics at atmels have that feature 2023-01-30 13:57:54 Oh you mean a built in quadrature counter? 2023-01-30 13:57:59 I was just assuming I'd write it. 2023-01-30 13:58:05 But if it's built in even better. 2023-01-30 13:58:55 heck, there is an perenial drift issue in Nintendo Switch Joycon joysticks that are due to them cheaping out and using pots 2023-01-30 14:00:23 threw together how one could replace the pots with quadrature encoders, an 7400’s updown counters, and cheap dacs to interface back into rest of the joycons circuitry 2023-01-30 14:00:28 Yeah. This would be for potentially very precise control, like frequency select in a transceiver or something. 2023-01-30 14:01:10 I once was thinking about trying to build and sell guitar effects boxes. And I was pretty amazed at just the cost of KNOBS and stuff. 2023-01-30 14:01:34 You can find cheap knobs, but you can also find some out there the vendor is extremely proud of. 2023-01-30 14:01:57 those kind of KNOBS are very durable and often need to be 2023-01-30 14:02:08 Sure, I'm sure there's a reason. 2023-01-30 14:02:21 In a market like that I do trust market forces to drive a semi-sane price. 2023-01-30 14:02:49 heard agrippa of some scale that digikey might start using for rating how vandal proof something is 2023-01-30 14:02:50 some guitar people go nuts for handmade stuff 2023-01-30 14:02:57 I know. 2023-01-30 14:03:22 doesnt make much sense to me. i would want a consistent sound using my friends device if he had the same model or if mine broke. you dont get that from handmade stuff 2023-01-30 14:03:41 Yeah, they're a sort of unusual crowd. 2023-01-30 14:04:01 They sort of naturally rebel against uniformity. 2023-01-30 14:09:49 You could get consistency from handmade, if you were careful. 2023-01-30 14:10:57 the guitar effects crowd are fucking lunatics 2023-01-30 14:11:10 claiming to hear the difference between different batches of opamps and the like 2023-01-30 14:11:14 no 2023-01-30 14:11:16 no you can't 2023-01-30 14:11:32 I tend to agree. 2023-01-30 14:11:40 all you can hear is the Scarface-like quantities of coke you've just stuffed up your nose 2023-01-30 14:11:44 lay off the prang 2023-01-30 14:12:02 What beats me though is the folks who claim to here differences in different speaker cable materials. 2023-01-30 14:12:03 you cannot tell the difference between one type of PP3 battery and another by the sound 2023-01-30 14:12:27 hear 2023-01-30 14:14:26 I know one moderately famous guitarist whose favourite distortion pedal is one I made up out of bits of scrap Ferguson VideoStar 3V22 in the very early 90s when I was at school 2023-01-30 14:14:35 re speaker cable material: depends on the impedence curve and rating on the cables 2023-01-30 14:15:25 Yeah, I don't mean to say cables can have no affect. But some of the details they claim matter I don't buy. 2023-01-30 14:15:27 trying to stuff say broad and deep sound through a pair of bell wires instead of audio rated and you can hear the difference 2023-01-30 14:15:37 Of course. 2023-01-30 14:16:01 bell wires btw is what you use to wire up you doorbell btw 2023-01-30 14:16:17 :-) 2023-01-30 14:16:30 I took part in a double-blind speaker cable test once 2023-01-30 14:16:34 I was setting up the cables 2023-01-30 14:16:55 and genuinely, out of some very serious audio types, one pair of cables emerged a clear winner that they all preferred 2023-01-30 14:17:08 it is the material impedence mismatch that one has to look out for though 2023-01-30 14:17:27 Which depends mostly on the geometry. 2023-01-30 14:17:32 they were an old strimmer power lead that I chopped off before I binned it, and cut in half 2023-01-30 14:17:36 Or, rather, almost totally on the geometry. 2023-01-30 14:17:38 it is all about the propper termination and such 2023-01-30 14:17:48 Yes. 2023-01-30 14:17:51 10m of nice 5A 2-core cable 2023-01-30 14:17:57 the orange PVC was a nice touch 2023-01-30 14:18:08 Impedance mismatches definitely cause stuff. 2023-01-30 14:18:10 ever since then I've always used 5A orange garden cable for my PA speaker cables 2023-01-30 14:19:04 gordonjcp: multi stranded, nice and thick, and probably properly terminated. 2023-01-30 14:19:36 copper and not brittle aluminium crap 2023-01-30 14:23:04 Don't talk down to cable people or they'll twist your pair! 2023-01-30 14:23:29 conduct yourself accordingly 2023-01-30 14:24:16 They'll make you an offer you can't resist 2023-01-30 14:25:42 does it involved vampire taps 2023-01-30 14:27:09 I watched someone getting an IV yesterday and it reminded me of vampire taps somehow 2023-01-30 14:35:23 do those quadrature encoders click as you turn them? 2023-01-30 14:35:40 wondering if they can get stuck between two positions and have ambiguous output 2023-01-30 14:37:04 You can code in hysteresis. 2023-01-30 14:37:24 Make it so you have to get the "other" pulse to reverse direction. 2023-01-30 14:37:45 right 2023-01-30 14:37:47 So you'd have about a 15 degree or so turn before the output started to change. 2023-01-30 14:38:23 Since the position of the knob doesn't really "mean" anything, you don't have to worry about it being synched with the value. 2023-01-30 14:39:22 Basically once you honor the A or B signal by changing your value, you won't honor that one again until yo get an event on the other one. 2023-01-30 14:41:20 If you have that signal sitting there randomly flipping back and forth, though, it's a potential source of noise. 2023-01-30 14:41:55 I hope it doesn't click, actually; I'm picturing a control you might spin a lot of times. 2023-01-30 14:43:38 Oh, you can get it with integrated momentary pushbutton too. 2023-01-30 14:43:44 Both in the one control. 2023-01-30 14:44:19 The data sheet doesn't mention any clickstops. 2023-01-30 14:44:38 I'm guessing it doesn't do that. 2023-01-30 14:47:43 my 3D printer has a really nice one with stops and the momentary push button 2023-01-30 14:47:49 I really like it 2023-01-30 14:58:20 Yeah, for certain applications those stops would be nice. 2023-01-30 14:58:32 I don't much think so for a "tuning knob,' though. 2023-01-30 14:58:41 Or, I don't know. 2023-01-30 14:58:55 Maybe it was a "gentle" click. 2023-01-30 14:59:43 There might be a "happy medium" that could service both types of applications nicely. 2023-01-30 18:26:34 You know, I think I want to make this table a little more flexible than I'd originally intended. Let's say I'm supporting multiple processes. I load a process, and it allocates a dynamic block of RAM for its code. Not the xt's - the code the xt's point to. Then later it terminates. It can de-allocate the dynamic RAM, no problem. But it could also "free" the xt's, and then they could be re-used. 2023-01-30 18:27:16 So instead of just filling the table up from the bottom on compile and trimming it back linearly on FORGET, I'd be able to temporarily leave gaps in the table, that would get used later before the table grew any more. 2023-01-30 18:27:35 This would give me a system where I could "run programs" that added to the dictionary, did their thing, and then cleared out. 2023-01-30 18:28:08 Once a table entry exists, you can't move, because references to that index may get compiled somewhere. 2023-01-30 18:28:24 But when you know you're done with it you can abandon it, and that slot is available for re-use.