Wordle for the BBC Micro & Electron

User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

So - I've worked out what happened with QWEST. Seems a copy/paste of the code and a label not updated meant the code wandered off into another routine. Surprised it didn't end up in a heap on the floor.... It almost certainly happens for other words just they might not be such interesting ones.

However it seems that QWEST is in the dictionary - just not the target dictionary it should have been looking at - which has made me go back and look at the dictionary that I'm using. It seems there are quite a lot of words that I don't think should be there so I'm putting together another one which should have more usual words in it. I don't have space to use the Wordle one as it stands - or rather I don't have space to used the Wordle one without re-writing the Basic in assembler so I need to use an alternative.

Keyboard display is also corrected so I hope to have a (final?) version out later today/tomorrow.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

I've added V4 above - hopefully the last version...

Changes as follows:
  • Included an updated dictionary which should have more conventional words and less proper nouns
  • Fixed an issue that could cause a word not in the target list to be selected
  • Fixed incorrect colouring of the keyboard
  • Included an alternate colour scheme that should be easier to read for people with colour blindness.
Lurkio if you could do the honours and update bbcmicro.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
roland
Posts: 5148
Joined: Thu Aug 29, 2013 9:29 pm
Location: Born (NL)
Contact:

Re: Wordle for the BBC Micro

Post by roland »

The game is also available in the WiDFS *DMENU but it doesn’t run because WiDFS overwrites code at &A00 after the code of this game is loaded.

I’m working on a patch for WiDFS…
FPGAtom: 512 KB RAM, Real Time Clock and 64 colours
MAN WOMAN :shock:
User avatar
leenew
Posts: 4900
Joined: Wed Jul 04, 2012 4:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: Wordle for the BBC Micro

Post by leenew »

Hi,
Is anyone having difficulties getting Wordle to work on a real BBC Micro model B?
I cannot get it to recognise any words.
20220124_125213.jpg
I have managed to get it to work on my Master, but alas, not the beeb...

Lee.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Wordle for the BBC Micro

Post by lurkio »

leenew wrote: Mon Jan 24, 2022 1:11 pm Is anyone having difficulties getting Wordle to work on a real BBC Micro model B?
I cannot get it to recognise any words.
I have managed to get it to work on my Master, but alas, not the beeb...
I'm away from my Beebs at the mo, but I've been talking Lee through transferring the Wordle .SSD to his Master and also through running the game on various filesystems on his Model B, so I can say that the context is as follows: he got Wordle v4 to run on his Master from a MicroSD card via MMFS, but he failed to get it working on his Model B.

On his Model B, he tried running Wordle v4 from DFS 1.2, SWRAM-MMFS (using the same .SSD as on his Master), and RamFS (DataCentre) -- but it wouldn't work properly on any of them!: it just failed to recognise any words at all.

:!:
Last edited by lurkio on Mon Jan 24, 2022 8:29 pm, edited 3 times in total.
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

I've got V3 running on Issue 7 with 0.9 Acorn DFS 8271 controller happy to swap for 1.2DFS to test that

Edit : I did say V4 but I hadnt put it on the gotek :D
Last edited by marcusjambler on Mon Jan 24, 2022 4:45 pm, edited 2 times in total.
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

Cant find DFS 1.2 anywhere... The file on MDFS is 1k long
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Wordle for the BBC Micro

Post by lurkio »

marcusjambler wrote: Mon Jan 24, 2022 3:45 pm Cant find DFS 1.2 anywhere... The file on MDFS is 1k long
It's this file in this folder.

:idea:
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

Yup I can confirm that V4 does not work with 0.9 or 1.2DFS
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

Hmm. I am confused - the new version doesn't do anything significantly different with memory to V3 (there are slight differences but I can't see what might be the problem).

I've fired it up on my Bplus with an MMC and it works fine there. :?:

Question - does it work if you CHAIN"Intro" rather than boot off of the disk?
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

ChrisB wrote: Mon Jan 24, 2022 6:13 pm Question - does it work if you CHAIN"Intro" rather than boot off of the disk?
No this doesnt work in 0.9 or 1.2 DFS. Changing the seed doesn't help either
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

I don't understand this at all - There's nothing particularly nasty in the code.

Anyhow - I've "undone" the memory allocation changes that I put in for V4 here:
wordle.ssd
(31.25 KiB) Downloaded 43 times
Could you give this one a try?
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

ChrisB wrote: Mon Jan 24, 2022 6:54 pm
Could you give this one a try?
Sorry Chris still not accepting words using 0.9 or 1.2 DFS.
I dont have the other Filing Systems to try.

Edit : It is working in BeebEm
User avatar
marcusjambler
Posts: 1147
Joined: Mon May 22, 2017 12:20 pm
Location: Bradford
Contact:

Re: Wordle for the BBC Micro

Post by marcusjambler »

Strangely CH."INTROA" doesnt finish loading the game screen... It stops with the screen full of random chars.
Whereas CH."INTRO" does fully load but wont accept any words
User avatar
flaxcottage
Posts: 5717
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: Wordle for the BBC Micro

Post by flaxcottage »

Tried this one and the results are;

1. Works on a Master with a Datacentre in DFS, RAM, ADFS HDD, booting from all.

2. Does not work on a BBC with 8271 DFS and DNFS. The words appear not to be in the file.

3. Works perfectly in BeebEm 4.17 for all BBC variants

Weird this one. #-o
- John

Check out the Educational Software Archive at www.flaxcottage.com
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Wordle for the BBC Micro

Post by lurkio »

Wordle v4 works fine in Model B mode in all of the following emulators: b2 on macOS, BeebJIT on macOS (under WINE), Win BeebEm4.17 on macOS (under WINE), JSBeeb.

A very subtle bug/issue, this..!

:?:
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Wordle for the BBC Micro

Post by KenLowe »

Confirming that I'm also seeing the same issue on a beeb with DFS2.26 (1770 controller). Switch in the co-pro and it works fine.
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Wordle for the BBC Micro

Post by lurkio »

KenLowe wrote: Mon Jan 24, 2022 10:02 pm Confirming that I'm also seeing the same issue on a beeb with DFS2.26 (1770 controller). Switch in the co-pro and it works fine.
Do you mean you’re running Wordle v4 on the co-pro?

Is this a processor (instruction set) issue then?

:?:
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Wordle for the BBC Micro

Post by KenLowe »

lurkio wrote: Mon Jan 24, 2022 10:06 pm
KenLowe wrote: Mon Jan 24, 2022 10:02 pm Confirming that I'm also seeing the same issue on a beeb with DFS2.26 (1770 controller). Switch in the co-pro and it works fine.
Do you mean you’re running Wordle v4 on the co-pro?

Is this a processor (instruction set) issue then?

:?:
Correct. Wordle v4 works fine with my 6502 co-pro active, but not on the plain beeb with the co-pro disabled. I suspect a memory corruption issue more than an instruction set issue. One that is present on the beeb, but not when the co-pro is active.

Edit: Ok, so without fully understanding why, changing these two lines in INTRO (and IntroA) from:

Code: Select all

51PAGE=&6F00:CHAIN"Wordle"
52END
to:

Code: Select all

51*LOAD Wordle 6F00
52PAGE=&6F00:RUN
seems to fix it.

Edit2: Hmmm. It's not as straight forward as that! Not sure how I got it working a minute ago, but power off and on, and it's broken again!
User avatar
lurkio
Posts: 4351
Joined: Wed Apr 10, 2013 12:30 am
Location: Doomawangara
Contact:

Re: Wordle for the BBC Micro

Post by lurkio »

KenLowe wrote: Mon Jan 24, 2022 10:11 pm

Code: Select all

51*LOAD Wordle 6F00
52PAGE=&6F00:RUN
I don't think that's "safe" because it won't alter the values of TOP and LOMEM because there's no OLD before the RUN..?

Maybe try something like this instead of just RUN:

Code: Select all

*FX138,0,79
*FX138,0,46
*FX138,0,13
*FX138,0,249
*FX138,0,13
:?:
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

OK - I believe the issue has been located. Some late "optimisation" in the code introduced a bug where I was comparing more memory that I needed and this was uninitialised zero page - which I presume on the B+, master and emulators appears to be zeros but on a normal B doesn't seem to be.

If you type

Code: Select all

?&7D=?&85
before you run the game it should fix it for the moment.

I'll get a proper fix out in the next day or so.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Wordle for the BBC Micro

Post by KenLowe »

ChrisB wrote: Mon Jan 24, 2022 11:53 pm OK - I believe the issue has been located. Some late "optimisation" in the code introduced a bug where I was comparing more memory that I needed and this was uninitialised zero page - which I presume on the B+, master and emulators appears to be zeros but on a normal B doesn't seem to be.

If you type

Code: Select all

?&7D=?&85
before you run the game it should fix it for the moment.

I'll get a proper fix out in the next day or so.
That didn't work first time round, and I needed to enter the following to get it working:

Code: Select all

?&85=&85
However,

Code: Select all

?&7D=?&85
did work after a power cycle.

Looking at the code a bit further, would I be correct in thinking that the following code in CODE needs to be changed? I've given it a quick test, and it seems to work:

Code: Select all

.0967
  LDA #&00
  STA &7F
  LDA &80
  STA &78
  JSR &09A0
  JSR &0993 ; always returns with X=4
  INX       ; X=5
.0976
  LDA &77,X ; changed from LDA &78,X
  CMP &7F,X ; changed from LDA &80,X
  BNE &0984
  DEX
  BNE &0976
  LDA #&FF
  STA &7F
  RTS
.0984
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

Basically yes.

The INX was left in from a previous version and is in fact the issue. The offset doesn't need to be changed because at this point we know the first letter (It's how the words are indexed) so this will always be right. So comparing letters 2-5 (as opposed to letters 2-6!) is sufficient.

It seems that the values of memory in zero page are not initialised on the BBC B so the values at &78+5 (&7d) and &80+5 (&85) are different so the comparison always fails and the word is "not found".

Anyhow - with that in mind here is another version that should fix the problem and behave correctly on real hardware. Please let me know if this works for people.
wordle.ssd
(31 KiB) Downloaded 41 times
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: Wordle for the BBC Micro

Post by KenLowe »

Ah, that makes sense. I had assumed you needed to check all 5 letters, which is why I adjusted the offset and left the INX in place. I guess just checking the 4 letters will give you a bit of a speed boost compared to the fix I made which checks all 5 letters.

Thanks for the update. I'll give it a test later.
User avatar
flaxcottage
Posts: 5717
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: Wordle for the BBC Micro

Post by flaxcottage »

Tried this new one and the results now are;

1. Works on a Master with a Datacentre in DFS, RAM, ADFS HDD, booting from all.

2. Works on a BBC with 8271 DFS and DNFS and ADFS with PAGE at &2100. Quite a severe test that last.

3. Works perfectly in BeebEm 4.17 for all BBC variants

4. Works perfectly over my Econet on both BBCs and Masters

5. Works perfectly on an A5000 running !65Host

Brillo, thanks. =D>
- John

Check out the Educational Software Archive at www.flaxcottage.com
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

Wow - thanks for that - it's quite a list!

I'm surprised it copes with ADFS - I believe I've comprehensively trampled over it's workspace. Mind you I was pleasantly surprised to see the second processor earlier. I am however reasonably sure that it won't work if you load off of tape... (It could easily be made to work but I'm not sure there's much market - although it might amuse the external sites that seem to have picked up on it.).
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
roland
Posts: 5148
Joined: Thu Aug 29, 2013 9:29 pm
Location: Born (NL)
Contact:

Re: Wordle for the BBC Micro

Post by roland »

After I patched my WiDFS so that it does not use the workspace at &A00 Wordle V5 runs on my Beeb with WiDFS :D

Is it difficult to change the dictionary to other languages?
FPGAtom: 512 KB RAM, Real Time Clock and 64 colours
MAN WOMAN :shock:
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

Is it difficult to change the dictionary to other languages?
No not really - provided there aren't accents or similar required. Just need a list of "target" words - I would imagine anything more than a few hundred words would make too many to see repeats. Wordle has 2000 odd. And a dictionary of "possible" words. Space the Beeb gives you 11000-12000 words in total - but if you aimed for 8000 or so that would be more than enough.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
User avatar
roland
Posts: 5148
Joined: Thu Aug 29, 2013 9:29 pm
Location: Born (NL)
Contact:

Re: Wordle for the BBC Micro

Post by roland »

I’ll try to make a list of dutch words.
FPGAtom: 512 KB RAM, Real Time Clock and 64 colours
MAN WOMAN :shock:
User avatar
ChrisB
Posts: 547
Joined: Wed Oct 05, 2011 10:37 pm
Location: Surrey
Contact:

Re: Wordle for the BBC Micro

Post by ChrisB »

On the basis of the testing by flax cottage above I have updated the original post with V5. The only change is the bug fix. Seeds will be compatible.
Castle Defender, Untitled Dungeon Game, Night Ninja, Wordle, Waffle, Acorn Island, Beebchase, Ghostbusters
Post Reply

Return to “miscellaneous new bbc and electron games”