Friday, May 6, 2016

update updater updated

After some fascination with the node npm n birthing process today I am exploring what could perhaps be a python variety of this pattern

The challenge is to print pdf mastered documents using the Sphinx tool chain.

Our first (El Capitan) discovery is the built in easy_install command.

sudo easy_install pip
A great name for a package manager.

pip install sphinx
For the configure / install step we do

sphinx-quickstart

The quickstart sufffix is another example of Python design in which names are not abbreviated, shortened or in anyway mangled.

We then disappear down a rabbit hole of defaults, illuminating some of the various publishing options that the Sphinx tool chain can include.

I was not expecting the use of a makefile of such magnitude in my new doc's root.

The output of make help

Please use `make target' where target is one of
  html       to make standalone HTML files
  dirhtml    to make HTML files named index.html in directories
  singlehtml to make a single large HTML file
  pickle     to make pickle files
  json       to make JSON files
  htmlhelp   to make HTML files and a HTML help project
  qthelp     to make HTML files and a qthelp project
  applehelp  to make an Apple Help Book
  devhelp    to make HTML files and a Devhelp project
  epub       to make an epub
  epub3      to make an epub3
  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
  latexpdf   to make LaTeX files and run them through pdflatex
  latexpdfja to make LaTeX files and run them through platex/dvipdfmx
  text       to make text files
  man        to make manual pages
  texinfo    to make Texinfo files
  info       to make Texinfo files and run them through makeinfo
  gettext    to make PO message catalogs
  changes    to make an overview of all changed/added/deprecated items
  xml        to make Docutils-native XML files
  pseudoxml  to make pseudoxml-XML files for display purposes
  linkcheck  to check all external links for integrity
  doctest    to run all doctests embedded in the documentation (if enabled)
  coverage   to run coverage check of the documentation (if enabled)
  dummy      to check syntax errors of document sources

The pdflatex target requires a bit more installing...

After more education on why Mac is not Linux (some a tad irrelevant)  https://tug.org/mactex/elcapitan.html we soldier on.

After much deleting and emptying of recycling bins, we free up enough space on our Mac mini to fit 3GB of typesetting machinery known as TeX, and in a wee while hope to have our first pdf hot off the press.

The next week.

The directory '/Users/simon/Library/Caches/pip/http' or its parent directory 
is not owned by the current user and the cache has been disabled. 
Please check the permissions and owner of that directory. 
If executing pip with sudo, you may want sudo's -H flag.

Newb alert, just like npm the sharing of sudo and user folders is kinda suck for begrinners.

With the monkey2 .pdf I am hoping to sharpen up what I have learned getting the monkey pdf manual started.

To integrate MarkDown with which Mark and Monkey2 are very down with, we install additional bits with help from our new friends at Read The Docs.

http://docs.readthedocs.io/en/latest/getting_started.html#in-markdown

We check out the latest monkey 2 from it's home on github.

https://github.com/blitz-research/monkey2

And start a new document beginning with Appendix i - Monkey 2 Source code.

Monkey2 is written in Monkey2 and so many of the source files break the sphinx .monkey parser, but a surprising number don't.

Part 2


It is Wednesday night and we get to the bit where we need to explain why building Amiga emulation on raspberry-pi2 will rock.

Being open source we need to wait some time to build it ourselves, starting with some dependencies at detailed here:

https://github.com/Chips-fr/uae4arm-rpi

Part 3


It is Thursday night.

And success!

First demo of skid runs with a few issues.

Not before a quick go on virus aka zarch.

A surge of muscle memory reminds me of a serious 90s video game addiction as I am once again burning 8 million virtual cycles a second 68000 style to fly full tilt into the ground yet again. And again....

I have a whale to find.

The next plan is to investigate an Amiga Blitz BASIC build chain that produces Sega megadrive ROMS. Modern tools may (have) to be introduced to the tool chain as it is still unclear if it is all there....

The bootstrap involved fooling the Sega into thinking it was running AmigaOS (headless) by placing an exec pointer at location 4.
;
; MegaDrive SkidMarks (c)1995 Acid Software
;

 include startup.asm

 org $500

bbprog  incbin   skid.bin
 cnop    0,32768
music   incbin  skidmark.mus
 
 include music.asm

main    move    #$870f,$c00004
 move.b  #-1,$ff0002
 
;        move.l  #$53454741,$00a14000
 jsr     setup_z80
 move.l  #music,d2
 bsr     m_set_mod
 moveq   #1,d0 
 bsr     m_spl_mode              ; Set to DIRECT SPL mode (7 Voices).
;        move    #46,d0
;        move    #255,d3
;        bsr     m_start_tune
 
 move    #$8708  ,$c00004
 move.l  #dlist  ,$ff0004
 move.l  #clist  ,$ff0008
 move.l  #sbase  ,$ff000c
 move.l  #0      ,$ff0020




 jmp     bbprog

champdiff:
 Dc.b  105,40,29,   110,26,27,  44,0  ;rally  race 1
 Dc.b  105,55,45,   115,43,50,  60,0  ;       race 6,7
 Dc.b  105,70,68,   120,59,66,  60,0  ;       race 12

 Dc.b  98,40,29,   102,26,27,  44,0  ;Beach  race 1
 Dc.b  98,55,45,   105,43,50,  60,0  ;       race 6,7
 Dc.b  98,70,68,   110,59,66,  60,0  ;       race 12
    
 Dc.b  35,50,80,    45,26,67,  44,0  ;Snow  race 1
 Dc.b  35,75,90,    45,43,76,  60,0  ;       race 6,7
 Dc.b  35,100,100,  45,59,86,  60,0  ;       race 12

 Dc.b  108,26,24,   105,24,24,   44,0   ;ranch
 Dc.b  110,26,24,   107,24,24,   44,0   ;
 Dc.b  112,60,45,   118,43,50,  60,0    ;       race 6,7
 
 Dc.b  25,100,80,    30,30,100,  44,0  ;cow  race 1
 Dc.b  25,110,90,    30,40,110,  60,0  ;       race 6,7
 Dc.b  25,120,100,   30,50,120,  60,0  ;       race 12

 Dc.b  105,60,50,   105,60,50,   60,0   ;f1
 Dc.b  110,65,60,   110,65,60,   60,0   ;
 Dc.b  120,70,70,   120,70,70,  60,0    ;       race 6,7

;f1      dc.b  117,70,68,   121,59,66,  60,0
;cow     dc.b  25,127,101,  29,45,122,  68,0


;rally,beach,snow,ranch

typdiff:
 dc.b   75,70,55,   75,50,55,    54,0  ;mini  ;rally
 dc.b   75,70,55,   75,50,55,    54,0  ;mini  ;beach
 dc.b   75,70,55,   75,50,55,    54,0  ;mini  ;snow
 dc.b   75,70,55,   75,50,55,    54,0  ;mini  ;ranch
 dc.b   95,70,75,   75,50,55,    60,0  ;mini  ;Turbo rally
 dc.b   104,70,75,  75,50,55,    55,0  ;mini  ;Turbo beach
 dc.b   85,73,85,   75,50,55,    65,0  ;mini  ;Turbo snow
 dc.b   85,73,90,   75,50,55,    60,0  ;mini  ;Turbo ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)

 dc.b   80,38,40,   80,38,40,    50,0  ;buggy(vw)
 dc.b   80,38,40,   80,38,40,    50,0  ;buggy(vw)
 dc.b   80,38,40,   80,38,40,    50,0  ;buggy(vw)
 dc.b   80,38,40,   80,38,40,    50,0  ;buggy(vw)
 dc.b   61,70,100,   80,38,40,    60,0  ;buggy(vw) Turbo Rally
 dc.b   70,70,100,   80,38,40,    55,0  ;buggy(vw) Turbo Beach
 dc.b   55,73,100,   80,38,40,    65,0  ;buggy(vw) Turbo Snow
 dc.b   55,75,100,   80,38,40,    60,0  ;buggy(vw) Turbo Ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)

 dc.b   110,44,40,  110,45,40,    55,0  ;truck rally
 dc.b   110,44,40,  111,45,40,    55,0  ;truck beach
 dc.b   110,44,40,  110,45,40,    55,0  ;truck snow
 dc.b   110,44,40,  110,45,40,    55,0  ;truck ranch
 dc.b   106,60,55,  110,45,40,    55,0  ;truck Turbo rally
 dc.b   115,60,55,  111,45,40,    45,0  ;truck Turbo beach
 dc.b   100,63,65,  110,45,40,    55,0  ;truck Turbo snow
 dc.b   100,65,70,  110,45,40,    50,0  ;truck Turbo ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)

 dc.b   105,40,40,  105,40,40,   50,0  ;porsche
 dc.b   105,40,40,  105,40,40,   50,0  ;porsche
 dc.b   105,40,40,  105,40,40,   50,0  ;porsche
 dc.b   105,40,40,  105,40,40,   50,0  ;porsche
 dc.b   91,65,75,   105,40,40,   60,0  ;porsche Turbo Rally
 dc.b   100,60,75,  105,40,40,   60,0  ;porsche Turbo Beach
 dc.b   85,60,85,   105,40,40,   70,0  ;porsche Turbo Snow
 dc.b   85,70,90,   105,40,40,   65,0  ;porsche Turbo ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)

 dc.b   90,50,110,  90,50,110,   60,0  ;f1
 dc.b   90,50,110,  90,50,110,   60,0  ;f1
 dc.b   90,50,110,  90,50,110,   60,0  ;f1
 dc.b   90,50,110,  90,50,110,   60,0  ;f1
 dc.b   90,70,100,  90,50,110,   60,0  ;f1 Turbo Rally
 dc.b   105,70,100,  90,50,110,   60,0  ;f1 Turbo Beach
 dc.b   105,70,100,  90,50,110,   60,0  ;f1 Turbo Snow
 dc.b   105,70,100,  90,50,110,   60,0  ;f1 Turbo Ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)

 dc.b   70,40,80,   70,40,80,    40,0 ;cow rally
 dc.b   70,40,80,   70,40,80,    40,0 ;cow beach
 dc.b   70,40,80,   70,40,80,    40,0 ;cow snow
 dc.b   70,40,80,   70,40,80,    40,0 ;cow ranch
 dc.b   70,40,80,   70,40,80,    60,0 ;cow  Turbo rally
 dc.b   70,40,80,   70,40,80,    60,0 ;cow Turbo beach
 dc.b   70,40,80,   70,40,80,    60,0 ;cow Turbo snow
 dc.b   70,40,80,   70,40,80,    60,0 ;cow Turbo ranch

 dc.b   1,2,3,4,5,6,7,8    ;checksum (DONT TOUCH ME!)



;  these are the sound values!!!, 
cardiff:; FMMult,FMMin,FMPeak,SamMult,SamMin,SamPeak              
 dc.w 6,0,127,9,40,500        ;mini
 dc.w 6,0,127,8,40,500        ;vw
 dc.w 6,0,127,8,40,300        ;truck
 dc.w 6,0,127,8,40,500        ;porsche
 dc.w 6,0,127,8,40,500        ;f1
 dc.w 6,0,127,8,40,500        ;cow
 
  

dlist:  dc.l track,cardiff,champdiff,typdiff,150
;  the '150' is the number of frames to add on for each warp,150=secs


track:  incbin  tracks.ptr
 incbin  tracks.bin

clist   dc.l    car1,car2,car3,car4,car5,car6
car1    incbin  mini.car
car2    incbin  vw.car
car3    incbin  truck.car
car4    incbin  porsche.car 
car5    incbin  f1.car
car6    incbin  cow.car
 ;incbin  f1.car
 ;incbin porsche.car

sbase:  incbin  mini.shd
 incbin  vw.shd
 incbin  truck.shd
 incbin  porsche.shd
 incbin  f1.shd
 incbin  cow.shd

Int1:
Int2:
Int3:
Int5:
Int7:   rte

Int6:   move.w  #-1,$ff0000
 rte

vram    =       $40000000
sram    =       $40000010
vd      =       $c00000
z80     =       $a11100

Int4:   tst     $ff0014
 bne     boringint
 movem.l d0-d1/a0-a1,-(a7)
 lea     vd,a0
eol6:   btst    #2,5(a0)
 bne     eol6
eol5:   btst    #2,5(a0)
 beq     eol5

;        move.b  #1,z80
;label   btst.b  #0,z80
;        bne     label
 move.w  #$813c,$c00004
 ;move.w  #$8134,$c00004
 move    #$20,$ff0000
 move    #$857e,4(a0)
 move.w  #$8600,4(a0)
 lea     $ff0020,a1
 move.l  #sram,4(a0)              ;hscroll
 move.l  (a1)+,(a0)
 move.l  #vram+$10000000,4(a0)    ;vscroll
 move.l  (a1)+,(a0)
 move.w  #$9340,4(a0)
 move.w  #$9401,4(a0)
 move.l  $ff0010,d0
 move.w  #$9500,d1
 lsr.l   #1,d0
 move.b  d0,d1
 move    d1,4(a0)
 move    #$9600,d1
 lsr.l   #8,d0
 move.b  d0,d1
 move.w  d1,4(a0)
 move    #$9700,d1
 lsr.l   #8,d0
 move.b  d0,d1
 move.w  d1,4(a0)
 move.l  #vram+$3c000083,4(a0)
eol3:   btst    #2,5(a0)
 beq     eol3
eol2:   btst    #2,5(a0)
 bne     eol2
eol1:   btst    #2,5(a0)
 beq     eol1
;        move    #0,z80
 move.w  #$816c,4(a0)
 ;move.w  #$8164,4(a0)
 movem.l (a7)+,d0-d1/a0-a1
 rte
 
boringint
 movem.l d0-d1/a0-a1,-(a7)
 lea     vd,a0
 move    #$20,$ff0000
 move.l  #vram+$3c000083,4(a0)
 move.l  $ff0010,a1
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 move.l  (a1)+,(a0)
 movem.l (a7)+,d0-d1/a0-a1
 rte


; junk from here down
;
;name                    grip  topspeed  acceleration  steering
;porsche                105    40               40              50
;mini                    75      50               55              54
;buggy(vw)               80      38               40              50
;truck(4x4)              120    35               85              55
;F1                      90      50               110            60
;cow??                   70      40               80              110
;
;cardiff:Dc.b  98,26,24,   98,24,24,   44,0   ;classic
;        Dc.b  92,40,30,   108,33,25,  60,0   ;grunty    2
;        Dc.b  102,61,47,  115,59,45,  64,0   ;zippy
;        Dc.b  100,80,60,  110,50,60,  72,0   ;nippy
;        Dc.b  25,127,101, 29,45,122,  68,0   ;slippery
;        Dc.b  117,23,17,  104,17,10,  30,0   ;pathetic  2
;        dc.b 0,0,0,0,0,0,0,0  ;sneezy
;        dc.b 0,0,0,0,0,0,0,0  ;bashful
;;numbers are 0..127
;dc.b compgrip,comptop,compacc , humgrip,humtop,humacc, steering speed,0
;where 127 grippiness=no slide (n.b, grippiness also affects top speed)
;      127 topspeed  =very fast 
;      127 accel     =ridiculous..
;      127 steering  =POWER steering...
;
; n.b. the commas in the dc.b, you are allowed white space AFTER the comma
;              BUT NOT BEFORE!!!!!!!!!!!     
;settings from amiga skidmarks
;porsche dc.b  98,35,29,    112,26,27,  44,0
;mini    dc.b  92,63,44,    112,42,31,  60,0
;truck   dc.b  108,47,35,   110,44,40,  56,0
;vw      dc.b  102,61,47,   115,59,45,  64,0
;midget  dc.b  88,51,51,    102,44,47,  60,0
;camaro  dc.b  98,43,35,    108,29,40,  64,0
;f1      dc.b  117,70,68,   121,59,66,  60,0
;cow     dc.b  25,127,101,  29,45,122,  68,0


And I found the whale. But not the screenshot key....



Part 4


It is Friday night.

Blitzed!



And check this out!

One from the archives, thanks to Erik for the rebuild, top dog!