mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-14 10:37:36 +00:00
println is working! without scrolling.
This commit is contained in:
parent
9c2e04aa61
commit
84c2cea8c1
9
.idea/codeStyles/Project.xml
generated
9
.idea/codeStyles/Project.xml
generated
@ -4,15 +4,6 @@
|
||||
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
|
||||
<option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
|
||||
</JavaCodeStyleSettings>
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" withSubpackages="false" static="false" />
|
||||
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
|
||||
<package name="io.ktor" withSubpackages="true" static="false" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
|
||||
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />
|
||||
|
17
.idea/jarRepositories.xml
generated
17
.idea/jarRepositories.xml
generated
@ -6,6 +6,16 @@
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="project.local" />
|
||||
<option name="name" value="project" />
|
||||
<option name="url" value="file:C:\Users\svenv\OneDrive\Documents\GitHub\kickc/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="project.local" />
|
||||
<option name="name" value="project" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
@ -19,7 +29,12 @@
|
||||
<remote-repository>
|
||||
<option name="id" value="project.local" />
|
||||
<option name="name" value="project" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/repo" />
|
||||
<option name="url" value="file:D:\Users\svenv\OneDrive\Documents\GitHub\kickc/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="redhat-ga-repository" />
|
||||
<option name="name" value="Red Hat GA repository" />
|
||||
<option name="url" value="http://maven.repository.redhat.com/ga/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -12,6 +12,7 @@
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr4:4.9" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:antlr-runtime:3.5.2" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.antlr:ST4:4.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: org.abego.treelayout:org.abego.treelayout.core:1.0.3" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: com.ibm.icu:icu4j:61.1" level="project" />
|
||||
|
1776
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
1776
src/main/fragment/cache/fragment-cache-wdc65c02.asm
vendored
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@ char * const VERA_ADDRX_M = 0x9f21;
|
||||
// Bit 3: DECR Setting the DECR bit, will decrement instead of increment by the value set by the 'Address Increment' field.
|
||||
// Bit 0: VRAM Address (16)
|
||||
char * const VERA_ADDRX_H = 0x9f22;
|
||||
const char VERA_DECR = 0x08;
|
||||
const char VERA_INC_0 = 0x00;
|
||||
const char VERA_INC_1 = 0x10;
|
||||
const char VERA_INC_2 = 0x20;
|
||||
@ -104,12 +105,32 @@ char * const VERA_DC_VSTART = 0x9f2b;
|
||||
// $9F2C DC_VSTOP (DCSEL=1) Active Display V-Stop (8:1)
|
||||
char * const VERA_DC_VSTOP = 0x9f2c;
|
||||
// $9F2D L0_CONFIG Layer 0 Configuration
|
||||
// Bit 6-7: Map Height (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
// Bit 4-5. Map Width (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
// Bit 3: T256C (0: tiles use a 16-color foreground and background color, 1: tiles use a 256-color foreground color) (only relevant in 1bpp modes)
|
||||
// Bit 2: Bitmap Mode (0:tile mode, 1: bitmap mode)
|
||||
// Bit 0-1: Color Depth (0: 1 bpp, 1: 2 bpp, 2: 4 bpp, 3: 8 bpp)
|
||||
char * const VERA_L0_CONFIG = 0x9f2d;
|
||||
// Bit 0-1: Color Depth (0: 1 bpp, 1: 2 bpp, 2: 4 bpp, 3: 8 bpp)
|
||||
char const VERA_L0_CONFIG_COLOR_1BPP = 0x00;
|
||||
char const VERA_L0_CONFIG_COLOR_2BPP = 0x01;
|
||||
char const VERA_L0_CONFIG_COLOR_4BPP = 0x02;
|
||||
char const VERA_L0_CONFIG_COLOR_8BPP = 0x03;
|
||||
// Bit 2: Bitmap Mode (0:tile mode, 1: bitmap mode)
|
||||
char const VERA_L0_CONFIG_MODE_TILE = 0x00;
|
||||
char const VERA_L0_CONFIG_MODE_BITMAP = 0x04;
|
||||
// Bit 3: T256C (0: tiles use a 16-color foreground and background color, 1: tiles use a 256-color foreground color) (only relevant in 1bpp modes)
|
||||
char const VERA_L0_CONFIG_16C = 0x00;
|
||||
char const VERA_L0_CONFIG_256C = 0x08;
|
||||
// Bit 4-5. Map Width (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
char const VERA_L0_CONFIG_WIDTH_32 = 0x00;
|
||||
char const VERA_L0_CONFIG_WIDTH_64 = 0x10;
|
||||
char const VERA_L0_CONFIG_WIDTH_128 = 0x20;
|
||||
char const VERA_L0_CONFIG_WIDTH_256 = 0x30;
|
||||
char const VERA_L0_CONFIG_WIDTH_MASK = 0x30;
|
||||
unsigned int const VERA_L0_CONFIG_WIDTH[4] = { 32, 64, 128, 256 };
|
||||
// Bit 6-7: Map Height (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
char const VERA_L0_CONFIG_HEIGHT_32 = 0x00;
|
||||
char const VERA_L0_CONFIG_HEIGHT_64 = 0x40;
|
||||
char const VERA_L0_CONFIG_HEIGHT_128 = 0x80;
|
||||
char const VERA_L0_CONFIG_HEIGHT_256 = 0xC0;
|
||||
char const VERA_L0_CONFIG_HEIGHT_MASK = 0xC0;
|
||||
unsigned int const VERA_L0_CONFIG_HEIGHT[4] = { 32, 64, 128, 256 };
|
||||
// $9F2E L0_MAPBASE Layer 0 Map Base Address (16:9)
|
||||
char * const VERA_L0_MAPBASE = 0x9f2e;
|
||||
// $9F2F L0_TILEBASE Layer 0 Tile Base
|
||||
@ -126,12 +147,32 @@ char * const VERA_L0_VSCROLL_L = 0x9f32;
|
||||
// $9F33 L0_VSCROLL_H Layer 0 V-Scroll (11:8)
|
||||
char * const VERA_L0_VSCROLL_H = 0x9f33;
|
||||
// $9F34 L1_CONFIG Layer 1 Configuration
|
||||
// Bit 6-7: Map Height (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
// Bit 4-5. Map Width (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
// Bit 3: T256C (0: tiles use a 16-color foreground and background color, 1: tiles use a 256-color foreground color) (only relevant in 1bpp modes)
|
||||
// Bit 2: Bitmap Mode (0:tile mode, 1: bitmap mode)
|
||||
// Bit 0-1: Color Depth (0: 1 bpp, 1: 2 bpp, 2: 4 bpp, 3: 8 bpp)
|
||||
char * const VERA_L1_CONFIG = 0x9f34;
|
||||
// Bit 0-1: Color Depth (0: 1 bpp, 1: 2 bpp, 2: 4 bpp, 3: 8 bpp)
|
||||
char const VERA_L1_CONFIG_COLOR_1BPP = 0x00;
|
||||
char const VERA_L1_CONFIG_COLOR_2BPP = 0x01;
|
||||
char const VERA_L1_CONFIG_COLOR_4BPP = 0x02;
|
||||
char const VERA_L1_CONFIG_COLOR_8BPP = 0x03;
|
||||
// Bit 2: Bitmap Mode (0:tile mode, 1: bitmap mode)
|
||||
char const VERA_L1_CONFIG_MODE_TILE = 0x00;
|
||||
char const VERA_L1_CONFIG_MODE_BITMAP = 0x04;
|
||||
// Bit 3: T256C (0: tiles use a 16-color foreground and background color, 1: tiles use a 256-color foreground color) (only relevant in 1bpp modes)
|
||||
char const VERA_L1_CONFIG_16C = 0x00;
|
||||
char const VERA_L1_CONFIG_256C = 0x08;
|
||||
// Bit 4-5. Map Width (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
char const VERA_L1_CONFIG_WIDTH_32 = 0x00;
|
||||
char const VERA_L1_CONFIG_WIDTH_64 = 0x10;
|
||||
char const VERA_L1_CONFIG_WIDTH_128 = 0x20;
|
||||
char const VERA_L1_CONFIG_WIDTH_256 = 0x30;
|
||||
char const VERA_L1_CONFIG_WIDTH_MASK = 0x30;
|
||||
unsigned int const VERA_L1_CONFIG_WIDTH[4] = { 32, 64, 128, 256 };
|
||||
// Bit 6-7: Map Height (0:32 tiles, 1:64 tiles, 2:128 tiles, 3:256 tiles)
|
||||
char const VERA_L1_CONFIG_HEIGHT_32 = 0x00;
|
||||
char const VERA_L1_CONFIG_HEIGHT_64 = 0x40;
|
||||
char const VERA_L1_CONFIG_HEIGHT_128 = 0x80;
|
||||
char const VERA_L1_CONFIG_HEIGHT_256 = 0xC0;
|
||||
char const VERA_L1_CONFIG_HEIGHT_MASK = 0xC0;
|
||||
unsigned int const VERA_L1_CONFIG_HEIGHT[4] = { 32, 64, 128, 256 };
|
||||
// $9F35 L1_MAPBASE Layer 1 Map Base Address (16:9)
|
||||
char * const VERA_L1_MAPBASE = 0x9f35;
|
||||
// $9F36 L1_TILEBASE Layer 1 Tile Base
|
||||
@ -200,3 +241,4 @@ struct VERA_SPRITE {
|
||||
};
|
||||
// 8BPP sprite mode (add to VERA_SPRITE.ADDR to enable)
|
||||
const unsigned int VERA_SPRITE_8BPP = 0x8000;
|
||||
|
||||
|
@ -61,3 +61,26 @@ char vpeek(char vbank, char* vaddr);
|
||||
// - src: The source address in RAM
|
||||
// - num: The number of bytes to copy
|
||||
void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num );
|
||||
|
||||
void vram_to_vram(unsigned int num, char bget, void *vget, char iget, char bput, void *vput, char iput );
|
||||
|
||||
// Color Ram
|
||||
char * const COLORRAM = 0xd800;
|
||||
|
||||
// The colors of the C64
|
||||
const char BLACK = 0x0;
|
||||
const char WHITE = 0x1;
|
||||
const char RED = 0x2;
|
||||
const char CYAN = 0x3;
|
||||
const char PURPLE = 0x4;
|
||||
const char GREEN = 0x5;
|
||||
const char BLUE = 0x6;
|
||||
const char YELLOW = 0x7;
|
||||
const char ORANGE = 0x8;
|
||||
const char BROWN = 0x9;
|
||||
const char PINK = 0xa;
|
||||
const char DARK_GREY= 0xb;
|
||||
const char GREY = 0xc;
|
||||
const char LIGHT_GREEN = 0xd;
|
||||
const char LIGHT_BLUE = 0xe;
|
||||
const char LIGHT_GREY = 0xf;
|
@ -17,6 +17,8 @@
|
||||
#include "conio-nes.c"
|
||||
#elif defined(__ATARIXL__)
|
||||
#include "conio-atarixl.c"
|
||||
#elif defined(__CX16__)
|
||||
#include "conio-cx16.c"
|
||||
#else
|
||||
#error "Target platform does not support conio.h"
|
||||
#endif
|
||||
|
@ -54,3 +54,30 @@ void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num ) {
|
||||
for(char *s = src; s!=end; s++)
|
||||
*VERA_DATA0 = *s;
|
||||
}
|
||||
|
||||
// Copy block of memory (from RAM to VRAM)
|
||||
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM.
|
||||
// - vbank: Which 64K VRAM bank to put data into (0/1)
|
||||
// - vdest: The destination address in VRAM
|
||||
// - src: The source address in RAM
|
||||
// - num: The number of bytes to copy
|
||||
void vram_to_vram(unsigned int num, char bget, void *vget, char iget, char bput, void *vput, char iput ) {
|
||||
// Select DATA0
|
||||
*VERA_CTRL &= ~VERA_ADDRSEL;
|
||||
// Set address
|
||||
*VERA_ADDRX_L = <vget;
|
||||
*VERA_ADDRX_M = >vget;
|
||||
*VERA_ADDRX_H = iget | bget;
|
||||
|
||||
// Select DATA1
|
||||
*VERA_CTRL |= VERA_ADDRSEL;
|
||||
// Set address
|
||||
*VERA_ADDRX_L = <vput;
|
||||
*VERA_ADDRX_M = >vput;
|
||||
*VERA_ADDRX_H = iput | bput;
|
||||
|
||||
// Transfer the data
|
||||
for(unsigned int i=0; i<num; i++) {
|
||||
*VERA_DATA1 = *VERA_DATA0;
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
"start_address": "0x080d",
|
||||
"cpu": "WDC65C02",
|
||||
"interrupt": "rom_min_cx16",
|
||||
"emulator": "x16emu -debug -run -scale 2 -prg",
|
||||
"emulator": "x16emu -debug -run -prg",
|
||||
"defines": {
|
||||
"__CX16__": 1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user