Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:59 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Help needed to update the Welcome Tape to 0.6

     Page 1 of 2    
Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:22pm 08 Dec 2020
Copy link to clipboard 
Print this post

Hi folks,

I was wondering whether I might appeal to the community to help me update the Welcome Tape for the new firmware ?

The current development version can be downloaded here: https://github.com/thwill1000/cmm2-welcome/archive/develop-r0.6.zip

This is the same as release 0.5 except I have bumped the version number and fixed the problem with Lunar Lander having a SUB with the same name as the new HELP command.

I would appreciate it if:

1. One or more volunteers could smoke-test every program on the Welcome Tape using firmware RC4: http://www.thebackshed.com/forum/ViewTopic.php?TID=12884&PID=160651. Five minutes on each should suffice to identify any obvious new issues.

2. The 3D API literati could point me at exactly which of @matherp's demos should be included on the Welcome Tape (and test them on RC4) and that @matherp, assuming he is also happy for me to include them, could then confirm all the 3D models used are in the public domain or point me at the appropriate license.

Known issues:

1. None of the CSUB examples work since the move to 5.06.00, they all hang
        - @Saquatch are you out there because I believe they are all your work?

2. @vegipete (?) reported that the menu program hung during the animation and he had to remove the line that plays the music (mp3) to get it to work
        - I haven't been able to reproduce this, does anyone else see it?

Best wishes,

Tom
Edited 2020-12-09 04:58 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 06:48pm 08 Dec 2020
Copy link to clipboard 
Print this post

Tom

Try this on RC4 - no major mods - just tiny tweaks


zmim.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:57pm 08 Dec 2020
Copy link to clipboard 
Print this post

  matherp said  Tom

Try this on RC4 - no major mods - just tiny tweaks

zmim.zip


Not sure what is has to do with the Welcome Tape, but "nice" nevertheless. When did we get #DEFINE, did it pass me by ? or is it what you've been up to for the last 24 hours ? ... I was "worrying" that something new was coming because you've been quiet
Edited 2020-12-09 04:58 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:03pm 08 Dec 2020
Copy link to clipboard 
Print this post

I'm beginning to worry about you Tom

Here

  Quote  

  Quote  
In addition this release now supports the #DEFINE directive


Brave man. I predict a flurry of additional enhancement directive requests now arriving, I will try to refrain.


Tom
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:07pm 08 Dec 2020
Copy link to clipboard 
Print this post

  matherp said  I'm beginning to worry about you Tom ...


That's what 2 kids, a wife, CV-19 and a day-job do to you. I'm going senile before my time ... I wish I was joking

Thanks Peter
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 442
Posted: 07:10pm 08 Dec 2020
Copy link to clipboard 
Print this post

  thwill said  Hi folks,

2. @vegipete (?) reported that the menu program hung during the animation and he had to remove the line that plays the music (mp3) to get it to work
        - I haven't been able to reproduce this, does anyone else see it?

Best wishes,

Tom


Hi, Tom

I've had no trouble with the mp3. Imagine: My system actually works when another has an error! Is scrolling text working yet or does that use a CSUB?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:19pm 08 Dec 2020
Copy link to clipboard 
Print this post

The mp3 issue was RC2 only
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:24pm 08 Dec 2020
Copy link to clipboard 
Print this post

  toml_12953 said  Is scrolling text working yet or does that use a CSUB?


That's a CSUB example by @Sasquatch and @vegipete. You can manage basic scrolling text in BASIC alone, but this example fades the text in as it appears and then fades it out again as it disappears from the screen.

  matherp said  The mp3 issue was RC2 only


Great, I can cross that one off the list then.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 07:43pm 08 Dec 2020
Copy link to clipboard 
Print this post

Also

The writers won't be able to fix the CSUB examples. I need one or more of them to post C source so I have something to test against. V5.06.00 has a big change in the graphics and I can't test/fix without knowing what they are calling and how
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:47pm 08 Dec 2020
Copy link to clipboard 
Print this post

  matherp said  Also

The writers won't be able to fix the CSUB examples. I need one or more of them to post C source so I have something to test against. V5.06.00 has a big change in the graphics and I can't test/fix without knowing what they are calling and how


https://github.com/thwill1000/cmm2-welcome/tree/master/fractals

https://github.com/thwill1000/cmm2-welcome/tree/master/mandelbrot-explorer

I don't have the C for the Scrolling Text example, I need to rectify that for r0.6.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 08:01pm 08 Dec 2020
Copy link to clipboard 
Print this post

I changed to a different SD card and the mp3 related menu problem went away.

Hunt the Wumpus doesn't return to the menu when you quit after shooting the wumpus.

If it matters, the original splash screen doesn't repeat the passing sun. It only goes for one day. If you change line 126ff from
 ' advance the sun
 angle = angle + 0.33
 if angle <= 179 then
   ' flip to other page
   flip_page = 1 + (flip_page = 1)
 endif
to
 ' advance the sun
 angle = angle + 0.33
 if angle > 179 then angle = 0
'  if angle <= 179 then
   ' flip to other page
   flip_page = 1 + (flip_page = 1)
'  endif
then you can have unending days of shadows.

Everything else, except for CSUBs and 'help' in LunarLander, seemed to work fine with RC4 on my 400MHz Waveshare CMM2.
Visit Vegipete's *Mite Library for cool programs.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:00am 09 Dec 2020
Copy link to clipboard 
Print this post

Thanks Pete,

  vegipete said  Hunt the Wumpus doesn't return to the menu when you quit after shooting the wumpus.


That looks like an "old bug", thanks for finding it, easily fixed.

  Quote  If it matters, the original splash screen doesn't repeat the passing sun. It only goes for one day ...


OK, I will change that as you suggest too.

  Quote  Everything else, except for CSUBs and 'help' in LunarLander, seemed to work fine with RC4 on my 400MHz Waveshare CMM2.


Great, same model as mine

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 10:03am 09 Dec 2020
Copy link to clipboard 
Print this post

Tom

CFunctions will need a simple re-compile for V5.06.00. No change of source needed.

Attached are the two above. These are compatible with V5.06.00RC5 just posted

CSUB Fern
00000000
4FF8E92D 46904C80 68074B80 681B6824 68222F00 F8D8681B ED2D5000 ED918B10
F3409B00 085280A9 EB00EEB7 46AB085B 2A90EE07 EEB046A9 46AA8B4E ABE7EEB8
3A90EE07 EEB82600 ED9FBBE7 ED9FDB4F ED9FCB50 E03BFB51 7B51ED9F 4B52ED9F
5B53ED9F 7B07EE2E 6B04EE2E 7B04EEA8 6B05EEA8 4B50ED9F EB51ED9F 8B47EEB0
7B04EE27 EB0EEE36 4B4AEEB0 EEB14B60 36015B04 F44F681B EEA942C8 465D4B07
5B45EE3E 7B48ED9F 7B45EE27 6BC4EEFD 0A90EE16 6B4BEEB0 6B09EEA7 7BC6EEFD
1A90EE17 42B74798 46CBD057 46A246D1 030AF3C6 4B4FB913 4798681B 25C5EA85
EA854B4D EA8444DA EA84040A 429C2415 4B4AD2B2 44234A4A D8184293 7B34ED9F
6B35ED9F 5B36ED9F 7B07EE2E 6B06EE2E 7B05EEA8 6B0CEEA8 4B27ED9F EB32ED9F
8B47EEB0 7B04EE27 EB0EEE36 4B3DE7AC 44234A3D D8164293 7B4EEE2C 6B2CED9F
4B2DED9F 7B0FEEA8 6B06EE2E EB1CED9F 6B04EEA8 8B47EEB0 4B17ED9F 7B04EE27
EB0EEE36 ED9FE790 EEB07B26 EE2E8B4D EEB0EB07 E7877B4D F8C8462C ECBD4000
E8BD8B10 BF008FF8 00000000 00000000 0A3D70A4 3FD0A3D7 9999999A 3FC99999
47AE147B 3FA47AE1 33333333 3FEB3333 47AE147B BFA47AE1 00000000 40590000
9999999A 3FF99999 00000000 40490000 1EB851EC 3FD1EB85 EB851EB8 3FCEB851
33333333 BFC33333 C28F5C29 3FDC28F5 C28F5C29 3FCC28F5 D70A3D71 3FCD70A3
47AE147B 3FC47AE1 080002EC 080002F0 08000338 0800033C 26666666 EB851EB8
11EB851D FD70A3D7 11EB851E
End CSUB


CSUB mandelbrot
00000000
4FF0E92D 46834C50 460F2000 46906824 8B08ED2D 9301B083 4B4C47A0 681B494C
681B6809 9000F8D1 F3402B00 EE078083 3B013A90 BB00EEB6 A118F8DF 7AE7EEF8
0603FB09 AB00EEB1 EEB09300 EE878A67 9B017A88 0F00F1B9 5B08EEB0 6B00ED97
9B00ED93 7AC7EEB7 7B4BEE37 4B06EE87 9B05EE94 EE07DD4B 464D9A90 8AE7EEF8
D10206AB 3000F8DA EE074798 F8DB5A90 EEB03000 EEF85B08 2B017AE7 3B00ED98
6AA8EE87 7B00ED97 6AC6EEB7 6B4BEE36 4B07EE86 3B05EEA4 2401DD39 5B20ED9F
7B45EEB0 4B45EEB0 6B45EEB0 7B07EE37 EE363401 EEB06B44 429C4B49 4B05EEA7
7B03EE36 5B44EEB0 EE27D01C EE256B07 EE364B05 EEB42B04 EEF12BCA DDE5FA10
043FF004 F80319AB 3D014C01 9B00D1B8 0609EBA6 EE07B173 3B013A90 7AE7EEF8
E7949300 200019AB 0C01F803 D0F9E7ED E7E52401 ECBDB003 E8BD8B08 BF008FF0
00000000 00000000 08000340 080002F0 080002EC 0800033C
End CSUB


I'll do the rotating text if you can find the source.

V5.06.00 will include version V1.4 of ARMCFunctions.h to match the firmware
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 10:10am 09 Dec 2020
Copy link to clipboard 
Print this post

Thank you Peter, much appreciated.

I'm doing something with Turbo64 at the moment but I'll try and check them out later in the day.

  matherp said  I'll do the scrolling text if you can find the source.


Thanks, it doesn't look like @Sasquatch ever posted it, so until/unless he becomes active again I'm out of luck.

Thanks again,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 377
Posted: 04:14pm 10 Dec 2020
Copy link to clipboard 
Print this post

  matherp said  Tom

CFunctions will need a simple re-compile for V5.06.00. No change of source needed.

Attached are the two above. These are compatible with V5.06.00RC5 just posted



I'll do the rotating text if you can find the source.

V5.06.00 will include version V1.4 of ARMCFunctions.h to match the firmware


@Peter - If nothing is changed, won't the compiler generate the same code?  Am I missing something?

I'll post the 'C' source for the scroll demo as soon as I get home later today.
-Carl
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 04:26pm 10 Dec 2020
Copy link to clipboard 
Print this post

I think the difference is in duplicated rows in old FW against 1:1 in new FW...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 06:56pm 10 Dec 2020
Copy link to clipboard 
Print this post

A (very) little modified but working Scrolling text:
'Scrolling Fading Text Demo
'By vegipete
'Made possible with CSUB by The Sasquatch
'www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=12876

#Include "../../common/welcome.inc"

Mode 1,8

page write 2 : cls
page write 1 : cls : text 0, 0, "Press Q to Quit"
page write 0 : cls

dim integer sw_x = 125      ' scroll window x location
dim integer sw_y = 100      ' y location
dim integer sw_width = 550  ' width
dim integer sw_height = 200 ' height
dim integer page1Adr = MM.INFO(PAGE ADDRESS 1)
'box sw_x-2, sw_y-2, sw_width+4, sw_height+4, 2, rgb(red) ' put a box around scroll window

' build custom colours from #100 to #131
for i = 0 to 31
map(100 + i) = rgb(8*i, 8*i, 8*i)
next i
map set


do
read txt$
if txt$ = "END" then exit do
page write 2
text 20,0,txt$+space$(75),LT,1   ' 8x12 character
page write 1
for i = 1 to 12   ' character height
  blit sw_x,sw_y+1,sw_x,sw_y,sw_width,sw_height-1   ' shift scroll box image up 1
  blit 0,i,sw_x,sw_y+sw_height-1,sw_width,1,2   ' copy row of pixels to bottom of scroll box
  FixColours
  page copy 1,0,B
  pause 40
next i
if we.is_quit_pressed%() then exit do
loop

page write 0

we.end_program()

sub FixColours
local integer i,j

for i = 0 to 31  ' 5 bit fade region
  FixBytes(page1Adr, sw_x, sw_y+i,sw_width,2,100+i) 'Change all non zero bytes in the row to 100+i
  FixBytes(page1Adr, sw_x, sw_y+sw_height-i,sw_width,1,100+i) 'same change, different row
next i
end sub


data "BASIC (Beginners' All-purpose Symbolic Instruction Code) is a"
data "family of general-purpose, high-level programming languages"
data "whose design philosophy emphasizes ease of use. The original"
data "version was designed by John G. Kemeny and Thomas E. Kurtz and"
data "released at Dartmouth College in 1964. They wanted to enable"
data "students in fields other than science and mathematics to use"
data "computers. At the time, nearly all use of computers required"
data "writing custom software, which was something only scientists"
data "and mathematicians tended to learn."
data " "
data "In addition to the language itself, Kemeny and Kurtz developed"
data "the Dartmouth Time Sharing System (DTSS), which allowed multiple"
data "users to edit and run BASIC programs at the same time. This"
data "general model became very popular on minicomputer systems like"
data "the PDP-11 and Data General Nova in the late 1960s and early"
data "1970s. Hewlett-Packard produced an entire computer line for this"
data "method of operation, introducing the HP2000 series in the late"
data "1960s and continuing sales into the 1980s. Many early video"
data "games trace their history to one of these versions of BASIC."
data " "
data "The emergence of early microcomputers in the mid-1970s led to"
data "the development of a number of BASIC dialects, including"
data "Microsoft BASIC in 1975. Due to the tiny main memory available"
data "on these machines, often 4 kB, a variety of Tiny BASIC dialects"
data "was also created. BASIC was available for almost any system of"
data "the era, and naturally became the de facto programming language"
data "for the home computer systems that emerged in the late 1970s."
data "These machines almost always had a BASIC interpreter installed"
data "by default, often in the machine's firmware or sometimes on a"
data "ROM cartridge."
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data " "
data "END"

'Graphic Color Changing Subroutines
'By The Sasquatch
'As requested by thwill and vegipete
'www.thebackshed.com
'
'File graphsubs.bas written 08-10-2020 12:31:44
'FixBytes(x,y,h,w,New_Byte)
'Changes any non-zero Bytes within the bounding box to New_Byte
'For a line, set h or v to 1 set w and h to 0 for full screen
'WARNING only works correctly in 8 bit color modes -
'will not work properly in "pixel doubled" modes
CSUB FixBytes
 'FixBytes scrPage, X, Y, W, H, newColor

 00000000
 4FF0E92D F8DD9C09 6826E028 469CB346 4693681B 0800F04F 7948F44F F8DB461A
 680C7000 68034447 4707FB09 B19A441F 1CB41E7E F1067875 1BE40A01 F8DEB145
 70733000 2000F8DC D2034294 E7F04656 D3FB4294 681E9B09 0801F108 D3DE45B0
 8FF0E8BD
END CSUB

Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 11:54am 11 Dec 2020
Copy link to clipboard 
Print this post

Status update:

- Barnsley's Fern using CSUB - FIXED, thanks @matherp
- Scrolling Text using CSUB - FIXED with new CSUB by @jirsoft, can I have the .c file to accompany it please ?
- Mandlebrot Explorer - still hangs even with @matherp's newly compiled CSUB.

Best regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 12:13pm 11 Dec 2020
Copy link to clipboard 
Print this post

  thwill said  Status update:

- Scrolling Text using CSUB - FIXED with new CSUB by @jirsoft, can I have the .c file to accompany it please ?

Best regards,

Tom


Sorry, I forgot to post it. I will do it evenings at home...
Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 533
Posted: 06:44pm 11 Dec 2020
Copy link to clipboard 
Print this post

void FixBytes(unsigned int *scrPage, unsigned int *x, unsigned int *y, unsigned int *w, unsigned int *h, unsigned int *newCol)
//'FixBytes scrPage, X, Y, W, H, newColor
{
      char *adr;
      for(int yy = 0; yy < *h; yy++)
      {
             adr = (char *)scrPage[0];
             adr += *x + (*y + yy) * 800;
             for(int xx = 0; xx < *w; xx++)
             {
                    if(*adr != 0)
                           *adr = *newCol;
                    adr++;
             }
      }
}

Jiri
Napoleon Commander and SimplEd for CMM2 (GitHub),  CMM2.fun
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025