Arcade BBS down?
Steve Pampling (1551) 8170 posts |
Invalid year value error – please try again. Edited. |
Stuart Swales (1481) 351 posts |
I don’t know if 2021 passes validation yet |
Richard H (8675) 100 posts |
Primarily because that’s where Hugo put the original code, so he might pull any changes into that repo. GitHub isn’t perfect, for many reasons, but git is my Thing. I don’t like svn. Don’t like cvs, much, either.
I didn’t know there was one. Linky please?
There are several theories about why this might be the case, any or all of which might be correct. One which I particularly subscribe to is that as we get older we tend to have fewer new experiences. Consequently, one of the best ways to stave off the galloping nature of time is keep having more new experiences – keep learning new things and visiting new places. I’ve definitely noticed a different quality to the nature of time when I’m engrossed in the “ooooh, this is FUN” stage of learning a new thing.
It’s very subtle, and if you’re used to relatively strong black tea it can take a while for your palate to start noticing it. I think there is more fragrance than taste, too. White tea is even more subtle; I like bai mu dan, which really does taste of peonies but it took me several cups before I started noticing it.
Tried it. Have Spanish friends who foisted it on me once with the lie, “If you like tea then you will really love this.” Fifteen years later, we’re still friends. But I have not forgiven them. |
Stuart Swales (1481) 351 posts |
SimpleGit is available from PackMan |
Richard H (8675) 100 posts |
Thanks. I must be going blind, or daft, or both. I scanned the catalogue closely, but I didn’t see it. I will have a play this week. It will make things much more agreeable. |
Steve Fryatt (216) 2105 posts |
In what way? It’s playing nicely with RISC OS filetypes here; or, at least, it’s playing in the same way that Git itself does.
Putting things on GitHub (or one of the other public sites) means that the code is easily available, and remains available to other developers should the existing developers disappear for any reason or lose access to their old files. Assuming that stuff is usefully licenced, or can be so in the future, that’s a significant advantage in and of itself. |
Steve Pampling (1551) 8170 posts |
If you ever visit Malta, drink coffee. |
Rick Murray (539) 13840 posts |
That’s the theory, and it is nominally a good one. Reality, on the other hand, demands you ask two questions:
Give it ten years. We’ll be using something else. Just like ten years ago. And ten years before that… |
Rick Murray (539) 13840 posts |
I notice he’s also put up the driver for the SP_dual and later Atomwide serial podules, under the same Unlicence Licence. Could be something to 32 bitify and add to the RO5 repertoire for the IOMD machines? |
Steve Fryatt (216) 2105 posts |
The nice thing about Git, compared to SVN, or CVS, or whatever, is that it’s trivial to clone a repo and move it elsewhere. If GitHub ceases to be flavour of the month, a copy of the code can be cloned and moved to GitLab, or Sourceforge, or wherever is currently popular. You’ve got the lot, including the full commit history. And given the way these things go, if Git falls out of favour, the new Tool of Choice will almost certainly have a way to import Git repos and their history. Just as SVN imported CVS, and Git imports both. So I stand by my statement. The best that can be done is to use the current best practice, and give future developers the best chance possible of keeping things going. |
Rick Murray (539) 13840 posts |
and then re-import using the sysop utils? Sadly, it doesn’t work. Unrecoverable internal error (Internal error: abort on data transfer at &2037A188), must exit immediately *Where Address &2037A190 is at offset &0000079C in module 'ARCbbs_Filer' *MemoryI pc-20 +40 2037A170 : øÿÿ. : 1AFFFFF8 : BNE &2037A158 2037A174 : .0Fâ : E2463002 : SUB R3,R6,#2 2037A178 : .. ã : E3A01000 : MOV R1,#0 2037A17C : ..Ŵâ : E2811001 : ADD R1,R1,#1 2037A180 : ..Qá : E1510004 : CMP R1,R4 2037A184 : .... : 0A000005 : BEQ &2037A1A0 2037A188 : ¦.”ç : E79502A6 : LDR R0,[R5,R6,LSR #5] 2037A18C : .p.â : E206701F : AND R7,R6,#&1F ; =31 2037A190 < ...à : E0100718 : ANDS R0,R0,R8,LSL R7 2037A194 : .`ŷâ : E2866002 : ADD R6,R6,#2 2037A198 : ÷ÿÿ. : 0AFFFFF7 : BEQ &2037A17C 2037A19C : íÿÿê : EAFFFFED : B &2037A158 2037A1A0 : .` á : E1A06003 : MOV R6,R3 2037A1A4 : .€ ã : E3A08001 : MOV R8,#1 2037A1A8 : ¦.”ç : E79502A6 : LDR R0,[R5,R6,LSR #5] 2037A1AC : .p.â : E206701F : AND R7,R6,#&1F ; =31 *ShowRegs Register dump (stored at &2001B770) is: R0 = 00000000 R1 = 00000003 R2 = 00004000 R3 = 0000001A R4 = 00000005 R5 = 20382854 R6 = 00000020 R7 = 0000001E R8 = 00000003 R9 = 00000000 R10 = 20379E7C R11 = 00000006 R12 = 3011311C R13 = FA207FD4 R14 = FC0106A8 R15 = 2037A190 Mode SVC32 flags set: NzcvqjggggeAift PSR = 80000113 Which corresponds to this: ; Find how big gap is SUB r3,r6,#2 ; r3=start of gap MOV r1,#0 ; Size of gap findspace1 ADD r1,r1,#1 CMP r1,r4 BEQ findspace_ok ; What we need? LDR r0,[r5,r6,LSR#5] AND r7,r6,#31 ANDS r0,r0,r8,LSL r7 ADD r6,r6,#2 BEQ findspace1 ; Empty - continue BAL findspace0 ; Not big enough, skip for empty again It’s the LDR that is failing. Is… it trying to do something with rotated loads? If so, then, uh-oh. |
Rick Murray (539) 13840 posts |
Android != Linux.
The thing is, serial support these days is usually just a basic terminal (that may or may not support character placement a la VT100) that is used to stty into a Linux box or the bootloader. That’s why most of the ARM boards have a serial port of some sort, and that’s why they’re often only wired up with Tx, Rx, and Ground. There’s no need for flow control or anything when it’s a simple 115kbps link, as many are. |
Rick Murray (539) 13840 posts |
Set the terminal to display correctly… void scr_redraw(wimp_redrawstr *r,int *more) { int x,y; sprite_id id; sprite_factors factors; // ##RICK## id.s.addr=(sprite_ptr)scr_screen.spriteptr; id.tag=sprite_id_addr; x=r->box.x0-r->scx; y=r->box.y1-r->scy-(216*4); // ##RICK## scale the sprite for modern displays factors.xmag = 1; factors.ymag = 2; // double height (2:4 aspect -> 2:2 aspect) factors.xdiv = 1; factors.ydiv = 1; if (is16) { while(*more) { wimpt_complain(sprite_put_scaled(scr_screen.spritearea,&id,0,x,y,&factors,0)); wimp_get_rectangle(r,more); // ##RICK## added factors in above line } } else { while(*more) { wimpt_complain(sprite_put_scaled(scr_screen.spritearea,&id,0,x,y,&factors,trans)); wimp_get_rectangle(r,more); // ##RICK## added factors in above line } } } Note, this breaks using the BBS in MODE 12, MODE 15 etc. Given that it’s unlikely anybody is seriously using a TV resolution monitor these days, I’ve just patched in 2:2 (square pixel) support. |
Steve Pampling (1551) 8170 posts |
Dumb question: Have you downloaded a ready bundled RPCEmu + RO3.7 from the RPCEmu site to test an unmodified build on? |
Rick Murray (539) 13840 posts |
For the patently obvious reason that talking to a serial port (especially with no worries about flow control) can be done in about ten lines of code. You basically just toss data into the FIFO and let the hardware burp it out. Telnet, on the other hand, requires TCP/IP, which is pretty much a full networking stack. And if with crypto, oh my god. Like an easy half megabyte of code. Versus ten lines. Don’t forget, most of these ARM boards have at least one UART in the chip, you can talk directly to it. Quite a few of them have the network port as a USB device rather then in the chip. So, you know, add full USB support too. In addition to the stack and the crypto. Versus ten lines. |
Rick Murray (539) 13840 posts |
Depends how you’re looking at it. Bootloader? Low level debugging? Sometimes serial is useful.
Telnet and SCP aren’t the same thing. I agree, they should be supported. As to ANSI, that was mostly a DOS thing that got adopted by bulletin boards because you could do colours and cool character graphics. It’s nice to have ANSI supported, but it is less and less a thing these days. |
Hugo Fiennes (8778) 13 posts |
On the unaligned load; I don’t remember, but I’m guessing that ARM26 just ignored bits 0 and 1 with word loads – ie you got a load as if those were both zero. The function in question seems to be lockdata, about here: https://github.com/hfiennes/arcbbs/blob/50b47e60d4e7ba0c1edc30d4ec4a6b202abab30c/s/maila#L518 It seems like r6 is the pointer to the two bit field, and we iterate through the bitmap by incrementing r6 by 2 each time. The load that fails is trying to load a word at [bitmap base, r6>>5] which falls over when r6 becomes 32 as… well, that’s 1 after the shift. A fairly minimal fix would be to change this:
to this…
This seems to need addressing (ha!) in multiple places, like line 503, 518… pretty much anywhere with an LSR#5. To be honest it’s not terribly optimal (keeps reloading the same word!) but I’m going to minimal collateral damage here. edit: Actually, probably clearer and easier just to move the entire algorithm to use LDRB/STRB vs words. Change the LDR/STR to LDRB/STRB, change LSR#5 to LSR#7, change the masking from #31 to #7 and you’re pretty much there. Slower? Not really a thing at this point :P |
André Timmermans (100) 655 posts |
IIRC it performs the load by ignoring the 2 bottom bit but rotates the result by 16 bits if bit 1 is set, supposedly to help half-word loading. |
Rick Murray (539) 13840 posts |
Is it only loading/saving single bytes? I ask because the increment is 2, which might imply a 16 bit value. I wonder if BIC might be better than all the shifting? What’s it actually doing? Is each halfword an object size or something? |
Hugo Fiennes (8778) 13 posts |
The routine is looking for gaps in a free space map; each two bit pair indicates empty (00), header (01) and data (10). r6 is a bit offset, hence is incremented by 2 every loop, you can see how this works in the masking (r8=3, shifted left by r6&0×1f). However, the LSR#5 makes no sense there. Dividing the bit index by 32 does indeed give you the word index, but… eg bit 32 is then an offset of 1, not 4 as it should be to move to the next word. So it looks like a terrible bug, but given that this is a free space map I would have expected it to cause constant messagebase corruption! The idea to change to LDRB/STRB and LSR#5 to LSR#3 (duh, not 7) should make it work as…. intended. I think. I also noticed that I was comparing bitfields with constants in bits 0&1… without shifting. Oh dear. Committed change to github, but it’s not tested: https://github.com/hfiennes/arcbbs/commit/507e7e022cfe1e931398126cb22ec2276ae600dc#diff-ddb2b0846f835a16734fc0f6ec1a4a6c4d422f88614eaf8bec21adbf4314a0c1 |
Rick Murray (539) 13840 posts |
Ah, it’s two bits, not two bytes. |
Hugo Fiennes (8778) 13 posts |
When you tried the export/reimport, did it fall over on the export, or on the import? The code fixes are only about creation of new messages in the database. |
Rick Murray (539) 13840 posts |
It fell over at the import stage. |
Rick Murray (539) 13840 posts |
Fueled with tea and a shiny new tub of Celebrations, I did a 32 bit conversion of the updated module, this time using conditionals to permit 26 bit or 32 bit versions to be built (you’ll need It also has the terminal redraw fix. https://heyrick.eu/blog/files/arcbbs20210306.zip (963K) In use, it seems a lot more stable. I could import a messagebase, create, and read messages both publicly and privately. Two things to note – the server crashes on shutdown (kill_slavetasks?), and the module will crash messily if you quit the BBS and then restart it. So, still some things to look at, but we’re getting there! It might be worth a brave soul seeing how far it’s possible to get with a proper LineTask set up, and a serial port plus modem? [hmm, who did the TelnetIn thingy that Arcade used?] I feel really cold (don’t know why, God knows I was warm enough earlier! https://youtu.be/UIhZ1-s8NnM) so I’m going to make another tea and get under the heated blanket with Netflix. :-) |
Richard H (8675) 100 posts |
Nicely. And I have sucked the git repo from Hugo’s GitHub account, and will spend some time this weekend committing the changes and uploading to GitHub1, so that Hugo can merge them if he has a mind.
How many are left in the tub? 1 With any luck. Which may be in short supply now, as I’ve already had a very successful and productive morning doing Functioning Adult things. |