Kartik K. Agaram
3ee70401e3
.
2021-07-08 16:12:27 -07:00
Kartik K. Agaram
019fb0babc
scaling pbm images
2021-07-08 11:00:51 -07:00
Kartik K. Agaram
b628bbd686
.
2021-07-08 09:26:55 -07:00
Kartik K. Agaram
afda7d59c0
better ppm colors
...
I had some logic to make hue distance cylindrical, but it wasn't right.
2021-07-08 01:13:38 -07:00
Kartik K. Agaram
0f29e61238
better greyscale
2021-07-08 00:26:58 -07:00
Kartik K. Agaram
9c70f7c643
.
2021-07-08 00:21:01 -07:00
Kartik K. Agaram
359f55d893
.
2021-07-08 00:13:12 -07:00
Kartik K. Agaram
d1482a9e89
ppm colors are weird, though
2021-07-08 00:12:31 -07:00
Kartik K. Agaram
91af9ccf2c
ppm support
...
Typo in commit fe3cbcd77: it only rendered pbm/pgm.
2021-07-07 19:43:56 -07:00
Kartik K. Agaram
d73c84e299
instructions for Universal Ctags
...
Thanks Sumeet Agarwal for raising this issue.
2021-07-07 19:34:54 -07:00
Kartik K. Agaram
d78a45340c
.
2021-07-07 19:24:12 -07:00
Kartik K. Agaram
fe3cbcd778
render ppm/pgm
...
Looks pretty bad compressing 256 shades of grey to 8.
2021-07-07 09:57:18 -07:00
Kartik K. Agaram
a9353ea327
load ppm/pgm/ppm on demand
2021-07-07 08:35:17 -07:00
Kartik K. Agaram
ef73cb78f1
initial image rendering
...
Supports just some ASCII formats: https://en.wikipedia.org/wiki/Netpbm
Colors are messed up. That's next.
2021-07-07 07:13:16 -07:00
Kartik K. Agaram
2d3fe4e940
.
2021-07-06 21:35:22 -07:00
Kartik K. Agaram
c31c02f0d1
.
2021-07-06 08:39:46 -07:00
Kartik K. Agaram
d84d17d6f5
nearest h/s/l color by a euclidean metric
2021-07-06 07:01:14 -07:00
Kartik K. Agaram
cbf22e7ab2
primitives for double-buffering
...
I thought I needed these for this bouncing-ball demo:
def (bounce screen)
with (w (width screen)
h (height screen)
cx 16
cy 16
dx 12
dy 19)
while 1
clear screen
ring screen cx cy 16 3 5
cx += dx
cy += dy
when (or (cx > w) (cx < 0))
set dx 0-dx
when (or (cy > h) (cy < 0))
set dy 0-dy
for _ 0 (< _ 100) ++_ # delay
No matter how I adjusted the delay I couldn't get rid of the jitter. So
I built a double-buffered version:
(bounce2 . [def (bounce2 screen)
with (w (width screen)
h (height screen)
cx 16
cy 16
dx 12
dy 19
screen2 (new_screen (columns screen)
(lines screen)))
while 1
clear screen2
ring screen2 cx cy 16 3 5
cx += dx
cy += dy
when (or (cx > w) (cx < 0))
set dx 0-dx
when (or (cy > h) (cy < 0))
set dy 0-dy
blit screen2 screen
for _ 0 (< _ 100) ++_]) # delay
But it didn't make a difference! Turns out nothing will help you when
successive frames are too far apart. This is the correct tweak to
`bounce`:
- dx 12
- dy 19)
+ dx 1
+ dy (/ 19 12))
Still, we'll keep double-buffering around for the future.
2021-07-05 23:18:30 -07:00
Kartik K. Agaram
468b0d979f
shell: fix clear on screens
...
Broken since commit c95648c96
on Jul 3.
Unclear what test to write for this. Should clear-stream check for NULL?
Should apply-clear?
2021-07-05 22:06:37 -07:00
Kartik K. Agaram
5d614af955
expose Mu implementation of 'bezier'
...
Still no support for acute-angled control points.
2021-07-05 18:31:07 -07:00
Kartik K. Agaram
493aabf79a
replace 'circle' with Mu implementation
2021-07-05 18:21:02 -07:00
Kartik K. Agaram
c7bedaf49b
replace 'vline' with Mu implementation
2021-07-05 18:12:07 -07:00
Kartik K. Agaram
5d8a858a6f
replace 'hline' with Mu implementation
2021-07-05 18:08:40 -07:00
Kartik K. Agaram
0b07a43367
replace 'line' with Mu implementation
2021-07-05 18:08:33 -07:00
Kartik K. Agaram
f32caac6df
grow code region yet again
...
We need a cleaner way to do this.
2021-07-05 17:53:57 -07:00
Kartik K. Agaram
ac1d702cdc
.
2021-07-05 17:36:25 -07:00
Kartik K. Agaram
1ac1fe1fff
.
2021-07-05 17:35:38 -07:00
Kartik K. Agaram
c95648c960
reading from streams
...
The Mu shell has no string literals, only streams. No random access,
only sequential access. But I've been playing fast and loose with its
read pointer until now. Hopefully things are cleaned up now.
2021-07-03 18:27:01 -07:00
Kartik K. Agaram
7ced4e44dd
alists
2021-07-03 16:28:15 -07:00
Kartik K. Agaram
d986404ff0
new primitive: cons?
2021-07-03 16:16:03 -07:00
Kartik K. Agaram
810d9a26f5
.
2021-07-03 10:57:36 -07:00
Kartik K. Agaram
a745749382
.
2021-07-03 10:44:05 -07:00
Kartik K. Agaram
bd538804db
reorg primitives on screen
2021-07-02 19:31:15 -07:00
Kartik K. Agaram
c8fb6d6aca
clean up final abort in macroexpand
2021-06-30 20:43:34 -07:00
Kartik Agaram
49d60aa575
delete a known issue
...
I can't reproduce the issue with the keyboard handler anymore :/
2021-06-30 09:44:20 -07:00
Kartik K. Agaram
c76679dbff
more general timer interface
2021-06-29 22:46:26 -07:00
Kartik K. Agaram
1083f2a400
.
2021-06-29 22:37:00 -07:00
Kartik K. Agaram
eba4e7af24
move timer handler to boot.subx
2021-06-29 22:26:08 -07:00
Kartik K. Agaram
3df5232ca4
timer and keyboard handlers working together
2021-06-29 22:12:32 -07:00
Kartik K. Agaram
db5f7c26a5
.
2021-06-29 22:05:00 -07:00
Kartik K. Agaram
d418bc0c97
.
2021-06-29 21:58:46 -07:00
Kartik K. Agaram
cd411f0901
timer working in presence of null keyboard handler
2021-06-29 21:55:37 -07:00
Kartik K. Agaram
069a8df45c
.
2021-06-29 21:54:22 -07:00
Kartik K. Agaram
5616691621
ooh, timer works fine in isolation
...
Acknowledging the interrupt is necessary.
2021-06-29 21:53:36 -07:00
Kartik K. Agaram
f25b8e6e41
poking at the broken timer interrupt handler again
2021-06-29 21:37:06 -07:00
Kartik Agaram
f9888786c3
.
2021-06-27 08:44:34 -07:00
Kartik K. Agaram
0237be29aa
.
2021-06-27 08:32:44 -07:00
Kartik K. Agaram
1b82006eae
.
2021-06-27 08:25:49 -07:00
Kartik K. Agaram
efecaa99d5
simplify Qemu instructions
...
Turns out we don't need a special case for KVM.
https://qemu.readthedocs.io/en/latest/system/invocation.html
2021-06-27 08:05:18 -07:00
Kartik K. Agaram
c7e1fed2b9
.
2021-06-27 07:32:08 -07:00