Skip to content

Instantly share code, notes, and snippets.

@fu-sen
fu-sen / balloon.c
Created July 1, 2019 02:47
z88dk sprite sample 8x8
char sprite[] = { 8, 8,
0x0e /* ....###. */,
0x1d /* ...###.# */,
0x1f /* ...##### */,
0x1f /* ...##### */,
0x0e /* ....###. */,
0x08 /* ....#... */,
0x10 /* ...#.... */,
0xe0 /* ###..... */
};
@fu-sen
fu-sen / 5x5.c
Created July 1, 2019 02:55
z88dk sprite sample 5x5
char sprite[] = { 5, 5,
0x70 /* .###.... */,
0xe8 /* ###.#... */,
0xf8 /* #####... */,
0xf8 /* #####... */,
0x70 /* .###.... */
};
@fu-sen
fu-sen / sprite.c
Last active July 1, 2019 04:26
z88dk sprite sample
#include <graphics.h>
#include <games.h>
#include <stdio.h>
char balloon[] = { 8, 8,
0x0e, 0x1d, 0x1f, 0x1f, 0x0e, 0x08, 0x10, 0xe0
};
void main(){
clg();
@fu-sen
fu-sen / text.c
Last active December 4, 2019 03:38
text sample | z88dk
#include <stdio.h>
void main() {
for (int y=1; y<=6; y++) {
for (int x=1; x<=24; x++) {
printf("%c[%u;%uH ", 27, y, x);
}
}
printf("%c[%u;%uH",27,2,2); // locate
@fu-sen
fu-sen / test.c
Last active December 4, 2019 03:39
z88dk PC-E200/G text test
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
main(){
clg();
gotoxy(1,1);
printf("test\n");
// IchigoLatte PanCake library
// CC0 1.0 Public Domain Dedication - https://creativecommons.org/publicdomain/zero/1.0/
function pc-init(){
uart(10);
}
function pc-clear(cn){
uart(128,4,0,cn);
}
10 N=RND(1)*95+1
20 PLAY "n=N;"
30 GOTO 10
@fu-sen
fu-sen / ledtest.bas
Last active December 18, 2019 14:22
液晶の縦数ヶ所が表示されなくなった時に試すプログラム - PC-G850V https://poke-com.jimdofree.com/
10 CLS
20 FOR X=0 TO 143
30 FOR Y=0 TO 49
40 LINE (X,0)-(X,47),X,BF
45 WAIT 3
50 NEXT Y
60 NEXT X
70 GOTO 20
@fu-sen
fu-sen / logo.bas
Last active December 18, 2019 14:22
拡大文字サンプル - PC-G850 シリーズ用 https://poke-com.jimdofree.com/
10 CLS
20 PRINT "PC-G850V"
30 FOR Y=6 TO 0 STEP -1
40 FOR X=46 TO 0 STEP -1
50 IF POINT (X,Y)=1 GOTO 80
60 LINE (X*3,Y*6)-(X*3+2,Y*6+5),R,BF
70 GOTO 90
80 LINE (X*3,Y*6)-(X*3+2,Y*6+5),S,BF
90 NEXT X
100 NEXT Y
@fu-sen
fu-sen / Dockerfile
Last active January 28, 2020 03:40
Caddy v2 (Officical Docker Image) with Google Cloud Run https://caddy.community/t/caddy-works-with-google-cloud-run/6898
FROM caddy/caddy:alpine
COPY ./ /usr/share/caddy/
USER root
RUN sed -i 's/:8080/:{$PORT}/' /etc/caddy/Caddyfile