git @ Cat's Eye Technologies SixtyPical / 7323927
Add more notes and basically small cleanups in many places. Chris Pressey 3 years ago
4 changed file(s) with 30 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
3939 TODO
4040 ----
4141
42 ### Demo game
43
4244 Finish the little demo "game" where you can move a block around the screen with
4345 the joystick (i.e. bring it up to par with the original demo game that was written
4446 for SixtyPical)
4547
46 ### Operations on 16 bit values
48 ### Self-reference in signatures
4749
48 Compare word (constant or memory location) with memory location or pointer. (Maybe?)
50 A vector might store [the address of] a routine which changes the vector. Thus its
51 signature might look like `vector foo outputs foo`. Thus we need to support that.
4952
5053 ### `vector table` type
5154
6871
6972 ### And at some point...
7073
74 * Compare word (constant or memory location) with memory location or pointer. (Maybe?)
7175 * `copy x, [ptr] + y`
7276 * Maybe even `copy [ptra] + y, [ptrb] + y`, which can be compiled to indirect LDA then indirect STA!
7377 * Check that the buffer being read or written to through pointer, appears in approporiate inputs or outputs set.
2424
2525 There are also two *type constructors*:
2626
27 * X table (256 entries, each holding a value of type X, where X is `byte`)
27 * T table (256 entries, each holding a value of type T, where T is either
28 `byte` or `word`)
2829 * buffer[N] (N entries; each entry is a byte; N is a power of 2, ≤ 64K)
2930
3031 Memory locations
3131
3232 vector dispatch_game_state
3333 inputs joy2, pos
34 outputs delta, pos, screen, vic_border, vic_bg, screen1
34 outputs delta, pos, screen, screen1
3535 trashes a, x, y, c, z, n, v, ptr
3636
3737 //
4848
4949 vector cinv
5050 inputs joy2, pos
51 outputs delta, pos, screen, vic_border, vic_bg, screen1
51 outputs delta, pos, screen, screen1
5252 trashes a, x, y, c, z, n, v, ptr
5353 @ 788
5454
5555 vector save_cinv
5656 inputs joy2, pos
57 outputs delta, pos, screen, vic_border, vic_bg, screen1
57 outputs delta, pos, screen, screen1
5858 trashes a, x, y, c, z, n, v, ptr
5959
6060
124124
125125 routine game_state_play
126126 inputs joy2, pos
127 outputs delta, pos, screen, vic_border, vic_bg, screen1
127 outputs delta, pos, screen, screen1
128128 trashes a, x, y, c, z, n, v, ptr
129129 {
130130 call read_stick
144144
145145 routine game_state_title_screen
146146 inputs joy2, pos
147 outputs delta, pos, screen, vic_border, vic_bg, screen1
148 trashes a, x, y, c, z, n, v, ptr
149 {
150 ld a, 5
151 st a, vic_border
152 ld a, 0
153 st a, vic_bg
154 ld y, 0
155
147 outputs delta, pos, screen, screen1
148 trashes a, x, y, c, z, n, v, ptr
149 {
150 ld y, 0
156151 repeat {
157152 ld a, 82
158153 st a, screen1 + y
181176
182177 routine our_cinv
183178 inputs joy2, pos
184 outputs delta, pos, screen, vic_border, vic_bg, screen1
179 outputs delta, pos, screen, screen1
185180 trashes a, x, y, c, z, n, v, ptr
186181 {
187182 goto dispatch_game_state
193188 screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
194189 trashes a, y, n, c, z, vic_border, vic_bg
195190 {
191 ld a, 5
192 st a, vic_border
193 ld a, 0
194 st a, vic_bg
195 ld y, 0
196
196197 call clear_screen
197 copy game_state_title_screen, dispatch_game_state
198
199 copy game_state_play, dispatch_game_state
200 // copy game_state_title_screen, dispatch_game_state
198201
199202 copy word 0, pos
200203 with interrupts off {
00 #!/bin/sh
11
22 SRC=$1
3 if [ "X$1" = "X" ]; then
4 echo "Usage: ./loadngo.sh <source.60p>"
5 exit 1
6 fi
37 OUT=/tmp/a-out.prg
48 bin/sixtypical --traceback --analyze --compile --basic-prelude $SRC > $OUT || exit 1
59 if [ -e vicerc ]; then