Capital Cities Tester

People are still making stuff for the Sinclair related machines. Tell us about new games and other software that runs on the Spectrum, ZX80/ZX81, Pentagon and Next.
User avatar
Kweepa
Manic Miner
Posts: 311
Joined: Sat Feb 03, 2018 6:14 pm
Location: Albuquerque, New Mexico

Re: Capital Cities Tester

Post by Kweepa »

If you wanted to optimize it some, you could get the first letter in, say, A, then RESTORE 1000+10*A so you only have to search through words with the same first letter.
[EDIT]
Looking at the code, you'd be much better off just having each country on a single line:
100 DATA "Afghanistan", "Agfa Albion", 13, 10
101 DATA "Algeria", "Algerton", 11, 14
Then you wouldn't need to loop at all.
You could just RESTORE 100+country: READ a$,b$,x,y
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Capital Cities Tester

Post by R-Tape »

Kweepa wrote: Sun May 06, 2018 10:55 pm Looking at the code, you'd be much better off just having each country on a single line:
100 DATA "Afghanistan", "Agfa Albion", 13, 10
101 DATA "Algeria", "Algerton", 11, 14
Then you wouldn't need to loop at all.
You could just RESTORE 100+country: READ a$,b$,x,y
Oh that's much better, and a good way of allowing alternative strings for "St" and "Saint" etc. Cheers!

I might even be charitable and give "ULAANBAATAR" alternatives, AFAIK this is correct spelling, but a lot of people expect the anglicised "ULAN BATOR".
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Capital Cities Tester

Post by R-Tape »

I've made some improvements thanks to suggestions from Kweepa, which have allowed more scope for alternative spellings (Washington DC/Washington D.C., Nay Pyi Taw/Naypyidaw...). It will now find every country very quickly and the same speed regardless of the first letter, I'm actually embarrassed my first attempt had such an appalling way of READing the data :?

And I've added Northern Ireland!

I seem to be floating around the 45% mark, I permanently walk round in the hope that someone will randomly ask me what the capital of Burkina Faso is.
Spoiler
Ouagadougou!
As the next update will be next week, DOWNLOAD here for now.
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Capital Cities Tester

Post by MatGubbins »

Very nice and a lot faster. I'm still a plank.
Just a very small request.... Can we have a Currah Microspeech version that asks the questions, and speaks the answers and pronounces them correctly?
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Capital Cities Tester

Post by R-Tape »

MatGubbins wrote: Thu May 17, 2018 11:48 pm Can we have a Currah Microspeech version that asks the questions, and speaks the answers and pronounces them correctly?
That is a brilliant idea. I only used currah in a couple of games and have never developed with it, I assume it's possible here.
User avatar
Morkin
Bugaboo
Posts: 3251
Joined: Mon Nov 13, 2017 8:50 am
Location: Bristol, UK

Re: Capital Cities Tester

Post by Morkin »

Good shout, it's always nicer to be called a buffoon via the spoken (rather than written) word...
My Speccy site: thirdharmoniser.com
User avatar
MatGubbins
Dynamite Dan
Posts: 1238
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: Capital Cities Tester

Post by MatGubbins »

Currah only works with 48k Spectrums.
PAUSE 1 is your friend.
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Capital Cities Tester

Post by djnzx48 »

Is it really not possible to get the Microspeech to work with 128K machines? I might be remembering this wrong but I thought it just replaced the standard BASIC interrupt routine and paged in its own ROM at address 56, which output the contents of a buffer at the top of memory. So what if this routine was somehow bypassed and instead the allophones were just output directly to the hardware?

I suppose the problem would be how to page in the ROM to get at the allophone table without needing the interrupt routine to be running. On the +3 you can have RAM where the ROM normally is, so would that help?
Post Reply