Wednesday, September 28, 2016

Lausanne Night of the Museums




La Nuit des Musees is a once a year jamboree in Lausanne Switzerland where for a 12 hour period most local museums open (this year from 14.00 to 02.00) and allow visitors unrestricted access all for the price of one special ticket.  And, drum roll, that ticket is available to all, local residents, tourists etc, all for a price which is less than the entry to a single museum.

Oh and they lay on free Bus transport too.

Yes,  a Swiss bargain!  You read that right



This year all of these museums



The Preparation


Marcus and Agata and Sandra met up in Pully.  After Sandra fed us, Marcus fed the cats.  Well obviously.



Archeolab, Pully
Priory Avenue 4 
1009 Pully 
T +41 21 721 38 00 www.archeolab.ch



Our first museum because it is local.  Also there is a distinct rumour you can get thru it in a few minutes!  Sort of our 'starter for 10'




Everybody know Marcus is happy!



Mudac

Museum of Design and 
Contemporary Applied Arts Cathedral Square 6 
1005 Lausanne 
T +41 21 315 25 30 www.mudac.ch




Right now a TinTin exhibition amongst other things.



Now officially there are 'don't take any photographs signs' in the TinTin sections so initially I just had to improvise with this photograph.




But in some areas many people were snapping photos in front of the staff so I started too .








Some nice exhibits, and I include Sandra and Agata in this captioning, of course.






Elysee

Avenue de l'Elysée 18 
1006 Lausanne 
T +41 21 316 99 11 www.elysee.ch



We tried but sadly failed to appreciate the photographic works of  Wojciech Zamecznik at the Elysee museum.   Sad because he is Polish and we wanted to give him the benefit of the doubt.



Sandra was so bored she headed off to the canteen for some alternative entertainment




Marcus joined.  Yes it was a disappointing show.





Olympic  Museum


Quai d'Ouchy 1 
1006 Lausanne
T +41 21 621 65 11

Obviously with Lausanne being the official Olympic Capital who could refuse a visit to the very lavish Olympic museum.  It has been refurbished in the last year of so , so an even bigger treat awaits.




Just outside we thought we'd participate in the /race Usain Bolt/ running track competition.  There are some lights on the left that light up as you start the 100 metres sprint and you see if you can keep up with them.  We tried.  I think Usain's record is safe for now.













There are so many things to see here, I would allow over 2 hours if this is your first visit.  If you are passionate about an Olympic sport be it summer or Winter Olympics there will be something special for you to see here.


At the end of the evening, well in fact early Sunday morning, Marcus and Agata did a 2Km plus walk home.  Now we would say it would be a sleep in Sunday, but of course it turned out, that was not to be.  Exercise was calling.



So if you Visit
We hope not if but when, you come to visit us in Lausanne, perhaps for that exercise training I spoke of earlier then if you plan to come around September you can imbibe all the museums Lausanne has to offer, on this special night, and overdose on our significant Lausanne culture.

Please come :-)

Tuesday, September 27, 2016

More 68000 Assembler Required

*INCLUDE '/equ/jsysequ.asm'

latch   equ 0ffffff20h   ; also tried 0bfffff20h
year    equ 0ffffff26h   ; also 0bfffff26h

START:

      move.l #latch,a0  ; first must read latch
      move.b (a0)+,d1   ; read latch into d1

      move.b #10,(a0)+  ; set hour
      move.b #11,(a0)+  ; set minutes
      move.b #12,(a0)+  ; set seconds
      move.b #09,(a0)+  ; set month
      move.b #24,(a0)+  ; set date
      move.b #98,(a0)   ; set year

      move.l #latch,a0
      move.b (a0),d1    ; second read sets clock


      move #0,   D3
      jsys #_exit

      END START

Subtitle: Feel free to assist me!

See Also: Cromemco Millennium Bug

Marcus was never a big fan of Motorola 68000 assembler.  To set things in context, in the late 1970's and early 1980's three CPU  (i.e. processor) families were commonly used for Personal Computers.

- Motorola 6800 and if lucky 6809

- MOS Technology 6502

- Intel 8080 and then mostly Zilog Z80

At the time many embryonic business computers ran the CP/M operating System (or variant) and were powered by a Zilog Z80 processor with 64K Bytes of RAM memory.

But
However for Marcus and most other visionaries it was generally accepted that the Motorola 68000 processor  (and its follow on 68010 68020 68030) variants were the future.

That was until IBM announced the IBM PC using the Intel 8088 processor, and as a purist I would say ruined everything  (some would say changed everything).

A Shameless Z80 supporter
I did start with Intel 8080 assembler but I immediately felt at home with Z80 Assembler programming. The assembler mnemonics and instruction set were elegant and logical and simple.

By comparison the Motorola 6800 assembler or 6502 assembler was horrid.

Imagine the angst then when the computers we Engineered and Sold and programmed for traded up to Motorola 68000 assembler.   Aargh.   I did love the architecture and register layout of the Motorola 68000.  It was just the Assembler syntax felt alien to me.   Here then are some specific grumbles:

- The assembler syntax to me was inconsistent.

move.w   d0,d1  ; copy d0 register into d1
move.w   d0, AB1248H ; copy d0 into the contents of memory AB1248 Hex
; to me this should be move.w d0 (AB1248H).  Pah!

- The wrong way around Gromit

move #1,d0  ; load register d0 with the number 1
ld a,1      ; The Z80 was from right to left. Load A reg with 1.  Better!


- I had to remember different mnemonics for byte and word and long

move.b
move.l

come on!

- Processor capability confusion.  The 68010 had 32 bit registers but only a 24 bit address bus, but the 68020 has 32bit address and data bus, so to me this was added complexity I did not welcome

- Privilege levels, were there but not that useful.  Certainly did not map well onto the UNIX system architecture that I was familiar with

- Fancy Instructions:
There were many fancy auto increment instructions that allowed for a pointer to be incremented before or after an activity.  Whilst this looked very clever, it was actually too clever.  Meaning that I could do it at assembler level, but I was completely stumped as how to implement this in Compiler design,  at the time this made me feel like a dumbo!


Back to My Problem

First please read up my unsuccessful attempts to sort out the Cromemco Millennium Bug.  For the reasons below I can see that interaction directly with the clock hardware is not going to fix it.  But I ask somebody:

- Is my program working correctly
- What about the IO mapping, what memory addresses should I use?
- Am I programming it right, I mean the reading of the 1/100 register



Read And Comment Please:


 I dug up the Intersil ICM7170 datasheet and it became clear when I also downloaded the 'millennium' errata that direct programming would not change the outcome at the Operating ystem Level since the year is stored as a 2 digit number in this Hardware Clock. The OS is responsible completely for handling year 2000.




This is the Port IO layout





Memory mapping on the XXU Processor card









Anyway, my program attempts to set the date via raw assembler to 1999, but after the time command is run, it has not changed to 1999.


Lastly there is no XMU Memory Management installed and I presume that although this is a user program it can write to the IO ports as the above diagram shows?






Oh yes,  I initially missed this, because it was a footnote in the intersil pdf!
Without the 2 reads of the 1/100 second register I understand nothing gets set.  Hmm.


A Happy Ending?



There is no happy ending thus far.   But I am hopeful that this post might provoke a response from somebody with more Assembler knowledge than I who can help me towards a solution.  That solution to actually set the Hardware Clock.  And then I use the Cromix /bin/time.bin command to read that changed time and print it out.




Links
A decent M68000 Assembler tutorial

Monday, September 26, 2016

Exercise Us RSVP



Subtitle: More Miles,  And Smiles

We got a call from Julia on Sunday at about 17.00.  Could we go for a Cycle Ride.  How Long?  2 hours was the answer.  And when?  Now, she said!

Of course we said OKay


Exercising
Agata and Marcus have only a few Exercise rules, but they do include

- Daily Exercise:  Meaning something each day, even if it just a modest walk

- Never say No:  Means, if somebody asks us to help with a training session or join their exercise, we try our best to always say YES

We may not (yet) be the fastest Athletes in our class, but we have a couple of things going for us.

Recovery Time
Do we need recovery time?  It's very unusual for us to need any recovery time.  And Marcus is famous for not pre race tapering.  To do so I feel would make it just a little too difficult for the competition :-)

The rule we used to set is that we should be capable of, and that means we maintain a fitness level to perform a Marathon or similar endurance related activity every day.


Low Injury Rate
By being conservative on a race or  with your daily exercise means you keep something in reserve.   Certainly daily risk taking I would not encourage, because pushing it can lead to something breaking, snapping or going wrong.  And when that something is your own body, it normally takes ages to recover.

By all means undertake a training plan that gets tougher over time, but over a long time!


Time
Currently we do have the time to exercise and make a structured training plan.  No more trying to squeeze in an exercise session instead of lunch during the working day.  Having time is key

Diet
Discounting obvious things like smoking or drinking alcohol to excess, most of us eventually notice the connection between good diet and our ability to perform sport, at the highest level, consistently, and with minimal to zero recovery.

When you give into the temptations of fast food, or overly processed food, or don't eat regularly, or by your own certain knowledge,  /just eat crap/, you actually feel its detrimental effects on your daily exercise regime.

And then hopefully some basic Brain logic kicks in and requests you to modify this sub optimal behaviour. Not by cold turkey, but steadily over time , to /cut out that crap!/

We try to keep our eating habits healthy, and this does not mean expensive, rather it means (for us) , less meat, more fish, more bean, more unprocessed foods, low to little sugary foods,  just general common sense really.



And so
And so, back to our ride.   We had a fantastic 40Km cycle, along the Lake in Lausanne, a tour of the Vineyards, some nice climbs








Bike Friday

Along for the ride was a nice American, Gabrielle who introduced us to her new-ish touring bicycle. It is an American brand called Bike Friday.   It can disassemble in about 15 minutes and fits in a small case. It was quite impressive and so merits the following photo spread.

Their website:   https://www.bikefriday.com/folding-bikes/

Some pictures









Overall 
If you come to train in Lausanne then Marcus and Agata are just an internet ping away.   We are more than likely to act as your willing and cheerful Exercise training partners for that Cycle, Swim, Run or Trail Run.  We don't have a pre-set exercise training limit.   We look forward to meeting you here.



Sunday, September 25, 2016

Sunday Philosophy: Voting America



Save the Planet

I think most of us accept we are living in a Globalised world.  From technology, to Food, Infrastructure and People, etcetera.

Well we might regard the choice of a new America President as a critically important decision, one that is not safe to resigned to just plain old  /American voters/

So whilst Switzerland is indeed quite a fair old distance from the /United States of America/,  a term that one might view with some irony in these troubled times,   I and other citizens of that much larger Democracy, namely Europe, and happy to lend y'all a hand.

Sign us up for a vote

Or Two

This website therefore needs updating :-)




http://savetheday.vote/


Saturday, September 24, 2016

Saturday Music






Marcus and Agata and friends are getting ready for a Sports and Arts packed weekend.




This is music to get us into a suitably reflective mood.




Black Eyed Peas: Where is the Love




Zara Larsson: Too Good


See Also: Musical Links
Gala, Freed, Volkan UCA Remix
Gala, Freed, Official


Friday, September 23, 2016

Cromemco Millennium Bug





Can you really use a computer where the date, and perhaps the time is wrong?

Well try it.  I'd argue not.  But that's the current dilemma I am facing whilst trying to restore and use my Cromemco 68020 processor system, running the Cromix 172XXU Operating System.

Setting the Date and Time

Under Cromix from the command line you must use the time command and the time -s to set.  Unfortunately you must use console input so here are some examples


Setting time to 1995 works fine



Here is the time command help



Setting the time to 2016 does not work so well!


Trying a Rollover

After midnight on Dec 31 1999 the time jumps to Feb 6, 2036 !!


I tried a C program
Getting the C compiler to work was non trivial.  Well because it was designed for the 68010 Operating System not the 68020 one.  Oh and the docs describing the Linker options were well, wrong (and this was a late revision of the manual.  Tut tut)

 ty sd.c
#include <jsysequ.h>
#include <syslib.h>
#include <stdio.h>

main()
{
int rc;
unsigned int year;
struct sys_date mydate;
int sigmask=0, sigvalues=0;

char cmdline [20] [80];
strcpy ( cmdline [0], "sh");
strcpy ( cmdline [1], "-c");
strcpy ( cmdline [2], "/bin/time.bin");
strcpy ( cmdline [3], NULL );

printf ("cmdline0 was %s\n", cmdline[0] );

for ( year=0; year <=255; year++)
  {
  mydate.month=9;
  mydate.day=23;
  mydate.year= year;
  rc=setdate(&mydate);

  printf ( "Year %u, return code %d\n", year, rc);
/* no worky   rc=fshell (cmdline, sigmask, sigvalues);
  printf ("rc was %d\n", rc );
*/

  }

}





I was able to determine that the full range of character based input for the year which might logically viewed as an unsigned integer 0-255 were not accepted.  The results are

00-59 BAD
60-195 GOOD
196-255 BAD


68000 Assembler Interface



 I wrote and then assembled a 68000 Assembler program for 2015.  Works!

 ty sdate.asm
*INCLUDE '/equ/jsysequ.asm'


START:
      move #116, D1   ; year 116 for 2016
      move #09,  D2   ; month 9 september
      move #23,  D3   ; day is 23 decimal
      jsys #_setdate

      move #0,   D3
      jsys #_exit

      END START


system[74] /usr/pkg/asmd/asm68 sdate.asm
Cromemco 68000 Assembler version 01.15

Assembling: sdate.asm


Free memory = 27632

0 error(s)

system[75] /usr/pkg/asmd/link68 sdate

68010 XPU 167   Link68 source 1.32
sdate        sdate                     000000 000018  RWE

  0 multiply defined symbol(s)
  0 unknown symbol(s)

Address    Size     Attributes
000000     000018     RWE

Starting address: 000000
system[76] ./sdate
system[77] time
       Wednesday, October 29, 2036            20:10:34

As you can see when I change the assembler to ask to set the date to 2016, things go to pot :-(



Z80 Cromix Call




CDOS Z80 Assembler Interface

Hand Assemble A Z80 program
Since I still remember Z80 assembler I tried writing a privileged program in machine code  (there is no equivalent on the native 68000 processor).   There is a Z80 coprocessor card to execute Z80 instructions

2015 works ... wahoo!

But asking for year 2016 results in year 2036 and a mashed up time and month etc :-(





fshell does not work (for me)



Cromix does not have the equivalent of the Linux system() call and so you need to use fshell or fexec.  Unfortunately I did not get it working.  Bear in mind the C compiler I was using does not allow C99  or modern array assignment so it could well be my code.  Or alternatively bad sigmask and sigvalues since I could not find any guidance, despite match (Cromix version of UNIX grep) all the .h files I could find in /usr/include.





Desperate shell times

Not being able to get any C program to work, and with no 68010 assembler installed I resorted to a kludge testing solution



more doit
/bin/time.bin < ifile61
/bin/time.bin < ifile62
/bin/time.bin < ifile63


cat ifile61
1/1/61
12:34:56


- On my linux system generate a controlling script doit
- do it runs the time command 256 times, and takes input from 256 different files
- each one of those files has a different year number in it from 0 to 255
- I can't use the native Cromix shell because there is no way to make a loop!
- tar up the files into a v7 UNIX compatible file
- transfer the tar file from Windows VM machine to Cromix over a Serial cable
- unpack the tar file using the ftar -ux  Unix extract option
- run the doit shell script that reads the 256 files and log the output




So I iterate the year from 61 to 195 and find a whole range of illogical years result.  Including 2015 but not 2016.  I just don't believe it!




What works in the 68010 Cromix Version
I found however that this does work under the Cromix 167 Operating system for the 68000 processor

system[5] version cromix.*
    CRC OK   68010 XPU 167   Cromix-Plus Operating System
system[6] time -s
        Saturday, September 17, 2016            16:34:53
DATE (mm/dd/yy): 09/19/116
TIME (hh:mm:ss): 18:20
          Monday, September 19, 2016            18:20:00

Oh, and because 68010 code can work on the 68020 system I took the /bin/time.bin 68010 version and executed that in the 68020 environment.  No!  That did not work sadly.


Unbelievable bad luck!


Summary So far

Under the 68010 processor and the Cromix 167 Operating system, by specifying 3 digits  e.g. 116, to the 68010 version of /bin/time.bin I can specify the year 2016 and that is correctly set into the Operating System.  Further then, files created and saved have the correct date and time of the year 2016.

But under the 68020 processor, which cannot run Cromix 167 I must run Cromix 172XXU ( or 168XXU).  In this environment the same 'trick' to use 116 as the 2 digit year does not work and when used screws up both the date and the time

I tried using a C program instead of a command line to set the time, but it is no better

I then tried using 68000 Assembler and Z80 assembler via the priv and debug commands. They work for year 2015 (by specifying year 115) but not for 2016

Since the 68020 processor card is over 300% faster than the 8Mhz 68000 processor, and can also run UNIX  (well yet to be proven!) it would really suck to be constrained to run the older Operating System with the Slower processor card, just to have the time and date come out right.


#Cromemco