Skip to content

Commit 620b974

Browse files
authored
Merge pull request #281 from neilsf/develop
Develop to Main
2 parents 5ef9ba2 + 79c8e0d commit 620b974

94 files changed

Lines changed: 3424 additions & 652 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/dub-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build project
22

33
on:
44
push:
5-
branches: [ main, feature/x16-support, feature/mega65-support ]
5+
branches: [ main, release/v3.2.0-beta ]
66

77
jobs:
88
build:

examples/gravity.bas

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ CONST MIN_X = 24.0
1111
CONST MAX_X = 318.0
1212
CONST MAX_Y = 228.0
1313

14-
DIM key AS BYTE
15-
16-
TYPE SPRITE
14+
TYPE MOB
1715
x AS FLOAT
1816
y AS FLOAT
1917
vx AS FLOAT
@@ -24,14 +22,14 @@ TYPE SPRITE
2422
THIS.y = THIS.y + THIS.vy
2523
THIS.vy = THIS.vy + GRAVITY
2624

27-
REM -- Hit the wall
25+
' Hit the wall
2826
IF (THIS.x >= MAX_X AND THIS.vx > 0) OR (THIS.x <= MIN_X AND THIS.vx < 0) THEN THIS.vx = THIS.vx * HBOUNCE
29-
REM -- Hit the ground
27+
' Hit the ground
3028
IF THIS.y >= MAX_Y AND THIS.vy > 0.0 THEN
3129
IF ABS(THIS.vx) < 0.2 THEN END
3230
THIS.vy = THIS.vy * VBOUNCE
3331

34-
if THIS.vx > 0.0 THEN
32+
IF THIS.vx > 0.0 THEN
3533
THIS.vx = THIS.vx - FRICTION
3634
ELSE
3735
THIS.vx = THIS.vx + FRICTION
@@ -45,30 +43,29 @@ TYPE SPRITE
4543
STATIC screen_y AS BYTE
4644
screen_x = CINT(THIS.x)
4745
screen_y = CBYTE(THIS.y)
48-
POKE $D000, screen_x : REM sprite X coord
49-
IF screen_x > 255 THEN POKE $D010, 1 ELSE POKE $D010, 0
50-
POKE $D001, screen_y : REM sprite y coord
46+
lab_h:
47+
SPRITE 1 AT screen_x, screen_y
5148
END SUB
5249

5350
SUB init () STATIC
5451
THIS.x = 28.0
5552
THIS.y = 48.0
5653
THIS.vy = 0.0
5754
THIS.vx = 5.5
58-
POKE $D015, 1 : REM enable sprite
5955
MEMCPY @ball_shape, 960, 63
60-
POKE $07F8, 15 : REM sprite pointer
56+
SPRITE 1 SHAPE 15 COLOR 13 ON
6157
END SUB
6258
END TYPE
6359

64-
DIM ball AS SPRITE
60+
DIM ball AS MOB
6561
CALL ball.init()
6662

67-
loop:
63+
DO
6864
CALL ball.update()
69-
WAIT 53265, 128 : REM wait one frame
65+
' wait one frame
66+
WAIT 53265, 128
7067
CALL ball.draw()
71-
GOTO loop
68+
LOOP WHILE 1
7269

7370
ball_shape:
7471
DATA AS BYTE 0,126,0,3,255,192,7,255,224,31,255,248
@@ -77,4 +74,4 @@ DATA AS BYTE 127,255,254,255,255,255,255,255,255
7774
DATA AS BYTE 255,255,255,255,255,255,255,255,255
7875
DATA AS BYTE 127,255,254,127,255,254,63,255,252
7976
DATA AS BYTE 31,255,248,31,255,248,7,255,224
80-
DATA AS BYTE 3,255,192,0,126,0
77+
DATA AS BYTE 3,255,192,0,126,0

examples/gravity.prg

3.52 KB
Binary file not shown.

lib/core/arith/_decimal.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22
33
; Add top 2 decimals on stack
44
MAC adddecimal

lib/core/arith/_float.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22

33
; Add top 2 floats on stack
44
MAC addfloat ; @push

lib/core/arith/_int.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22

33
; Add top 2 ints on stack
44
MAC addint

lib/core/arith/_long.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22

33
; Perform OR on top 2 long ints of stack
44
MAC orlong

lib/core/arith/_word.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22

33
; Add top 2 words on stack
44
; 32 cycles - could it be less?

lib/core/comp/_byte.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22

33
; Compare two bytes on stack for less than
44
MAC cmpbytelt ; @pull @push

lib/core/comp/_decimal.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROCESSOR 6502
1+
22
33
; Compare two decimals on stack for equality
44
MAC cmpdecimaleq ; @pull @push

0 commit comments

Comments
 (0)