mirror of
https://github.com/irmen/prog8.git
synced 2025-01-14 17:31:01 +00:00
some x16 example changes to use the improved mode $80 screen resolution
This commit is contained in:
parent
6d79903eb3
commit
f07065bf84
@ -5,17 +5,24 @@ For next release
|
|||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
- vm codegen: fix ifelse comparisons such as if x< 0
|
- vm codegen: fix ifelse comparisons such as if x< 0
|
||||||
- vm codegen: fix primes endless loop stuck on '2'
|
- vm codegen: fix primes endless loop stuck on '2'
|
||||||
|
- x16: check additional FP lib changes https://github.com/commanderx16/x16-rom/commit/ae608673f0210953172d6837acfbb231d62ddbd1
|
||||||
|
and https://github.com/commanderx16/x16-docs/commit/21238aedc641da91df88e04c4ce9bf3324a3c12d
|
||||||
- x16: check joystick support (petaxian, own stuff) because of api change in r39 kernal https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-joystick_get
|
- x16: check joystick support (petaxian, own stuff) because of api change in r39 kernal https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-joystick_get
|
||||||
- x16: screen_set_mode -> screen_mode + other args https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-screen_mode
|
- x16: screen_set_mode -> screen_mode + other args https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-screen_mode
|
||||||
- optimize diskio load_raw on X16 because headerless files are now supported https://github.com/commanderx16/x16-rom/pull/216
|
- x16: new vera memory layout https://github.com/commanderx16/x16-rom/issues/185 this may break certain things in gfx2 and elsewhere. Such as font rendering
|
||||||
|
broken examples: amiga, colorbars, cube3d, highresbitmap, rasterbars, tehtriz, testgfx2, testvtui
|
||||||
|
can we make the code read the new layout from vera registers instead of hardcoding it?
|
||||||
|
- x16: check new ZP free addresses https://github.com/commanderx16/x16-docs/commit/541f2ce9e61d1d0d0e157d7f52fe16bc0895e6f0
|
||||||
|
- x16: optimize diskio load_raw because headerless files are now supported https://github.com/commanderx16/x16-rom/pull/216
|
||||||
note: must still work on c64/c128 that don't have this!
|
note: must still work on c64/c128 that don't have this!
|
||||||
- major version bump once X16 r39 rom is officially finalized
|
- major compiler version bump once X16 r39 rom is officially finalized
|
||||||
- vm codegen: ForLoop
|
- vm codegen: ForLoop
|
||||||
- vm codegen: When
|
- vm codegen: When
|
||||||
- vm codegen: Pipe expression
|
- vm codegen: Pipe expression
|
||||||
- vm codegen: validate that PtFunctionCall translation works okay with resultregister
|
- vm codegen: validate that PtFunctionCall translation works okay with resultregister
|
||||||
- vm codegen: postincrdecr arrayvalue
|
- vm codegen: postincrdecr arrayvalue
|
||||||
- vm: support no globals re-init option
|
- vm: support no globals re-init option
|
||||||
|
- vm: how to remove all unused subroutines? (for asm, 64tass used to do this)
|
||||||
- vm codegen/assembler: variable memory locations should also be referenced by the variable name instead of just the address
|
- vm codegen/assembler: variable memory locations should also be referenced by the variable name instead of just the address
|
||||||
- when the vm is stable and *if* its language can get promoted to prog8 IL, the variable allocation should be changed.
|
- when the vm is stable and *if* its language can get promoted to prog8 IL, the variable allocation should be changed.
|
||||||
It's now done before the vm code generation, but the IL should probably not depend on the allocations already performed.
|
It's now done before the vm code generation, but the IL should probably not depend on the allocations already performed.
|
||||||
|
@ -26,7 +26,8 @@ main {
|
|||||||
rotate_vertices(msb(anglex), msb(angley), msb(anglez))
|
rotate_vertices(msb(anglex), msb(angley), msb(anglez))
|
||||||
|
|
||||||
cx16.GRAPH_set_colors(0, 0, 0)
|
cx16.GRAPH_set_colors(0, 0, 0)
|
||||||
cx16.GRAPH_draw_rect(32, 10, 256, 185, 0, true)
|
; cx16.GRAPH_clear()
|
||||||
|
cx16.GRAPH_draw_rect(32, 10, 256, 220, 0, false)
|
||||||
|
|
||||||
cx16.GRAPH_set_colors(1, 0, 0)
|
cx16.GRAPH_set_colors(1, 0, 0)
|
||||||
draw_lines_hiddenremoval()
|
draw_lines_hiddenremoval()
|
||||||
@ -119,7 +120,7 @@ _ones pla
|
|||||||
}
|
}
|
||||||
|
|
||||||
const uword screen_width = 320
|
const uword screen_width = 320
|
||||||
const ubyte screen_height = 200
|
const ubyte screen_height = 240
|
||||||
|
|
||||||
sub draw_lines() {
|
sub draw_lines() {
|
||||||
; simple routine that draw all edges, exactly once, but no hidden line removal.
|
; simple routine that draw all edges, exactly once, but no hidden line removal.
|
||||||
@ -207,8 +208,8 @@ _ones pla
|
|||||||
edgestodraw[edgeidx] = false
|
edgestodraw[edgeidx] = false
|
||||||
ubyte vFrom = shipdata.edgesFrom[edgeidx]
|
ubyte vFrom = shipdata.edgesFrom[edgeidx]
|
||||||
ubyte vTo = shipdata.edgesTo[edgeidx]
|
ubyte vTo = shipdata.edgesTo[edgeidx]
|
||||||
word persp1 = 200 + rotatedz[vFrom]/256
|
word persp1 = 170 + rotatedz[vFrom]/256
|
||||||
word persp2 = 200 + rotatedz[vTo]/256
|
word persp2 = 170 + rotatedz[vTo]/256
|
||||||
cx16.GRAPH_draw_line(rotatedx[vFrom] / persp1 + screen_width/2 as uword,
|
cx16.GRAPH_draw_line(rotatedx[vFrom] / persp1 + screen_width/2 as uword,
|
||||||
rotatedy[vFrom] / persp1 + screen_height/2 as uword,
|
rotatedy[vFrom] / persp1 + screen_height/2 as uword,
|
||||||
rotatedx[vTo] / persp2 + screen_width/2 as uword,
|
rotatedx[vTo] / persp2 + screen_width/2 as uword,
|
||||||
|
@ -43,11 +43,12 @@ irq {
|
|||||||
|
|
||||||
ubyte[32] pixels = 0 to 31
|
ubyte[32] pixels = 0 to 31
|
||||||
|
|
||||||
|
const ubyte y_offset = 6
|
||||||
sub irqhandler() {
|
sub irqhandler() {
|
||||||
next_irq_line += 6
|
next_irq_line += y_offset
|
||||||
anim1 += 4
|
anim1 += 4
|
||||||
anim2 += 6
|
anim2 += 6
|
||||||
if next_irq_line > 400 {
|
if next_irq_line > 480-y_offset {
|
||||||
av1++
|
av1++
|
||||||
av2 += 2
|
av2 += 2
|
||||||
anim1 = av1
|
anim1 = av1
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
main {
|
main {
|
||||||
const uword width = 256
|
const uword width = 256
|
||||||
const uword height = 200
|
const uword height = 240
|
||||||
const ubyte max_iter = 16 ; 32 actually looks pretty nice but takes longer
|
const ubyte max_iter = 16 ; 32 actually looks pretty nice but takes longer
|
||||||
|
|
||||||
sub start() {
|
sub start() {
|
||||||
@ -16,10 +16,10 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub mandel() {
|
sub mandel() {
|
||||||
const float XL=-2.000
|
const float XL=-2.200
|
||||||
const float XU=0.500
|
const float XU=0.800
|
||||||
const float YL=-1.100
|
const float YL=-1.300
|
||||||
const float YU=1.100
|
const float YU=1.300
|
||||||
float dx = (XU-XL)/width
|
float dx = (XU-XL)/width
|
||||||
float dy = (YU-YL)/height
|
float dy = (YU-YL)/height
|
||||||
ubyte pixelx
|
ubyte pixelx
|
||||||
@ -57,7 +57,7 @@ main {
|
|||||||
void cx16.screen_set_mode($80)
|
void cx16.screen_set_mode($80)
|
||||||
|
|
||||||
txt.plot(32, 5)
|
txt.plot(32, 5)
|
||||||
txt.print("256*200")
|
txt.print("256*240")
|
||||||
txt.plot(32, 6)
|
txt.plot(32, 6)
|
||||||
txt.print("mandel-")
|
txt.print("mandel-")
|
||||||
txt.plot(33, 7)
|
txt.plot(33, 7)
|
||||||
|
@ -18,7 +18,7 @@ main {
|
|||||||
ubyte pix=0
|
ubyte pix=0
|
||||||
ubyte ypos
|
ubyte ypos
|
||||||
cx16.FB_cursor_position(0, 0)
|
cx16.FB_cursor_position(0, 0)
|
||||||
for ypos in 0 to 199 {
|
for ypos in 0 to 239 {
|
||||||
repeat 320/2 {
|
repeat 320/2 {
|
||||||
cx16.FB_set_pixel((pix&15)<<4 | (pix&15))
|
cx16.FB_set_pixel((pix&15)<<4 | (pix&15))
|
||||||
pix++
|
pix++
|
||||||
@ -397,7 +397,7 @@ irq {
|
|||||||
phase++
|
phase++
|
||||||
next_rasterline += increment
|
next_rasterline += increment
|
||||||
|
|
||||||
if next_rasterline > 400 {
|
if next_rasterline >= 480 {
|
||||||
next_rasterline = 0
|
next_rasterline = 0
|
||||||
phase = 0
|
phase = 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user