1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-17 00:30:07 +00:00

Added a working memory block remapping (MAP instruction) test.

This commit is contained in:
jespergravgaard 2020-09-20 22:32:42 +02:00
parent 617a7a83d9
commit 77c15f80aa
16 changed files with 3742 additions and 1085 deletions

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 17a386c45a 17a386dc9c
//KICKC FRAGMENT CACHE 1813f9ad84 1813f9c5cd
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 17a386c45a 17a386dc9c
//KICKC FRAGMENT CACHE 1813f9ad84 1813f9c5cd
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 17a386c45a 17a386dc9c
//KICKC FRAGMENT CACHE 1813f9ad84 1813f9c5cd
//FRAGMENT vbuz1=vbuc1
lda #{c1}
sta {z1}

View File

@ -1,4 +1,4 @@
//KICKC FRAGMENT CACHE 17a386c45a 17a386dc9c
//KICKC FRAGMENT CACHE 1813f9ad84 1813f9c5cd
//FRAGMENT vbuz1=_deref_pbuc1
lda {c1}
sta {z1}

View File

@ -237,6 +237,11 @@ public class TestPrograms {
compileAndCompare("examples/nes-demo/nes-demo.c");
}
@Test
public void testMega65MemoryMapTest() throws IOException, URISyntaxException {
compileAndCompare("examples/mega65/memorymap-test.c");
}
@Test
public void testMega65Addressing32bit() throws IOException, URISyntaxException {
compileAndCompare("examples/mega65/32bit-addressing-mega65.c");

View File

@ -110,7 +110,6 @@
"command": "~/c64/kickc_local/bin/kickc.sh",
"args": [
"-vasmout",
"-Oloophead"
"-Sc",
"-odir",
"~/c64/tmp/",

View File

@ -1,91 +1,103 @@
// Test the MAP instruction for remapping memory
#pragma target(mega65)
#pragma emulator("/Users/jespergravgaard/c64/mega65/xemu-hernandp/build/bin/xmega65.native -prg")
#include <mega65.h>
void main() {
/*
// Remap block at $4000 to point to $10000
// offset = $10000-$4000 = $c000
asm {
lda #$c0 // lower blocks offset page
ldx #$40 // lower blocks to map + lower blocks offset
ldy #0
ldz #0
map
eom
}
// Put data into $4000
asm {
lda #$55
sta $4000
}
*/
char * block1 = 0x4000;
char * block2 = 0x8000;
memoryBlockRemap((unsigned char)>block1, 0x100);
memoryBlockRemap((unsigned char)>block2, 0x120);
// TODO: The mapper can only map the lower 32K to one memory address and the upper 32K to another
// TODO: The mapper always remaps both - so it cannot be separated into two different calls (without some memory)!
// Remap [$4000-$5fff] to point to [$10000-$11fff]
memoryRemapBlock(0x40, 0x100);
// Put 0x55, 0xaa into $10000
block1[0] = 0x55;
block1[1] = 0xaa;
block2[0] = 0x55;
block2[1] = 0xaa;
//block2[1] = 0xaa;
//block2[2] = block1[1];
// Remap [$8000-$9fff] to point to [$10000-$11fff]
memoryRemapBlock(0x80, 0x100);
// Put 0x55, 0xaainto $10002
block2[2] = 0x55;
block2[3] = 0xaa;
// Remap [$4000-$5fff] and [$8000-$9fff] to both point to [$10000-$11fff] (notice usage of page offsets)
memoryRemap(MEMORYBLOCK_4000|MEMORYBLOCK_8000, 0x0c0, 0x080);
// Put 0x55, 0xaa into $10004 in a convoluted way
block2[4] = block1[2];
block1[5] = block2[1];
}
// Remap one of the eight 8K memory blocks in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// After the remapping the CPU will access the mapped memory whenever it uses instructions that access the mapped block.
// Bit representing 8K block #0 of the 64K addressable memory ($0000-$1fff)
const unsigned char MEMORYBLOCK_0000 = 0b00000001;
// Bit representing 8K block #1 of the 64K addressable memory ($2000-$3fff)
const unsigned char MEMORYBLOCK_2000 = 0b00000010;
// Bit representing 8K block #2 of the 64K addressable memory ($4000-$5fff)
const unsigned char MEMORYBLOCK_4000 = 0b00000100;
// Bit representing 8K block #3 of the 64K addressable memory ($6000-$7fff)
const unsigned char MEMORYBLOCK_6000 = 0b00001000;
// Bit representing 8K block #4 of the 64K addressable memory ($8000-$9fff)
const unsigned char MEMORYBLOCK_8000 = 0b00010000;
// Bit representing 8K block #5 of the 64K addressable memory ($a000-$bfff)
const unsigned char MEMORYBLOCK_A000 = 0b00100000;
// Bit representing 8K block #6 of the 64K addressable memory ($c000-$dfff)
const unsigned char MEMORYBLOCK_C000 = 0b01000000;
// Bit representing 8K block #7 of the 64K addressable memory ($e000-$ffff)
const unsigned char MEMORYBLOCK_E000 = 0b10000000;
// Remap some of the eight 8K memory blocks in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// After the remapping the CPU will access the mapped memory whenever it uses instructions that access a remapped block.
// remapBlocks: Indicates which 8K blocks of the 6502 address space to remap. Each bit represents one 8K block
// - bit 0 Memory block $0000-$1fff. Use constant MEMORYBLOCK_0000.
// - bit 1 Memory block $2000-$3fff. Use constant MEMORYBLOCK_2000.
// - bit 2 Memory block $4000-$5fff. Use constant MEMORYBLOCK_4000.
// - bit 3 Memory block $6000-$7fff. Use constant MEMORYBLOCK_6000.
// - bit 4 Memory block $8000-$9fff. Use constant MEMORYBLOCK_8000.
// - bit 5 Memory block $a000-$bfff. Use constant MEMORYBLOCK_A000.
// - bit 6 Memory block $c000-$dfff. Use constant MEMORYBLOCK_C000.
// - bit 7 Memory block $e000-$ffff. Use constant MEMORYBLOCK_E000.
// lowerMemoryPageOffset: Offset that will be added to any remapped blocks in the lower 32K of memory (block 0-3).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 0 ($0000-$1fff) is remapped it will point to lowerMemoryPageOffset*$100.
// - If block 1 ($2000-$3fff) is remapped it will point to lowerMemoryPageOffset*$100 + $2000.
// - If block 2 ($4000-$5fff) is remapped it will point to lowerMemoryPageOffset*$100 + $4000.
// - If block 3 ($6000-$7fff) is remapped it will point to lowerMemoryPageOffset*$100 + $6000.
// upperMemoryPageOffset: Offset that will be added to any remapped blocks in the upper 32K of memory (block 4-7).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 4 ($8000-$9fff) is remapped it will point to upperMemoryPageOffset*$100 + $8000
// - If block 5 ($a000-$bfff) is remapped it will point to upperMemoryPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperMemoryPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperMemoryPageOffset*$100 + $e000.
void memoryRemap(unsigned char remapBlocks, unsigned int lowerMemoryPageOffset, unsigned int upperMemoryPageOffset) {
char * aVal = 0xfc;
char * xVal = 0xfd;
char * yVal = 0xfe;
char * zVal = 0xff;
*aVal = <lowerMemoryPageOffset;
*xVal = (remapBlocks << 4) | (>lowerMemoryPageOffset & 0xf);
*yVal = <upperMemoryPageOffset;
*zVal = (remapBlocks & 0xf0) | (>upperMemoryPageOffset & 0xf);
asm {
lda aVal // lower blocks offset page low
ldx xVal // lower blocks to map + lower blocks offset high nibble
ldy yVal // upper blocks offset page
ldz zVal // upper blocks to map + upper blocks offset page high nibble
map
eom
}
}
// Remap a single 8K memory block in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// All the other 8K memory blocks will not be mapped and will point to their own address in the lowest 64K of the MEGA65 memory.
// blockPage: Page address of the 8K memory block to remap (ie. the block that is remapped is $100 * the passed page address.)
// Legal block page addresses are: $00: block $0000-$1fff, $20: block $2000-$3fff, ..., $e0: block $e000-$ffff
// memoryPage: Page address of the memory that the block should point to in the 1MB memory space of the MEGA65.
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
void memoryBlockRemap(unsigned char blockPage, unsigned int memoryPage) {
// Which block is being remapped? (0-7)
char block = blockPage / $20;
void memoryRemapBlock(unsigned char blockPage, unsigned int memoryPage) {
// Find the page offset (the number of pages to offset the block)
unsigned int pageOffset = memoryPage-blockPage;
if(block&4) {
// High block (4-7)
char * yVal = 0xfe;
char * zVal = 0xff;
*yVal = <pageOffset;
*zVal = 1<<(block) | (>pageOffset & 0xf);
asm {
lda #0 // lower blocks offset page low
ldx #0 // lower blocks to map + lower blocks offset page high nibble
ldy yVal // upper blocks offset page
ldz zVal // upper blocks to map + upper blocks offset page high nibble
map
eom
}
} else {
// Low block (0-3)
char * aVal = 0xfe;
char * xVal = 0xff;
*aVal = <pageOffset;
*xVal = 1<<(4|block) | (>pageOffset & 0xf);
asm {
lda aVal // lower blocks offset page low
ldx xVal // lower blocks to map + lower blocks offset high nibble
ldy #0 // upper blocks offset page
ldz #0 // upper blocks to map + upper blocks offset page high nibble
map
eom
}
}
// Which block is being remapped? (0-7)
char block = blockPage / $20;
char blockBits = 1<<block;
memoryRemap(blockBits, pageOffset, pageOffset);
}
// Test corner case behaviors

View File

@ -0,0 +1,190 @@
// Test the MAP instruction for remapping memory
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.cpu _45gs02
// MEGA65 platform PRG executable starting in MEGA65 mode.
.file [name="memorymap-test.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$2001]
.segmentdef Code [start=$2017]
.segmentdef Data [startAfter="Code"]
.segment Basic
.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00 // 10 BANK 0
.byte $15, $20, $14, $00, $9e, $20 // 20 SYS
.text toIntString(main) // NNNN
.byte $00, $00, $00 //
// Bit representing 8K block #2 of the 64K addressable memory ($4000-$5fff)
.const MEMORYBLOCK_4000 = 4
// Bit representing 8K block #4 of the 64K addressable memory ($8000-$9fff)
.const MEMORYBLOCK_8000 = $10
.segment Code
main: {
.label block1 = $4000
.label block2 = $8000
// memoryRemapBlock(0x40, 0x100)
// Remap [$4000-$5fff] to point to [$10000-$11fff]
ldx #$40
jsr memoryRemapBlock
// block1[0] = 0x55
// Put 0x55, 0xaa into $10000
lda #$55
sta block1
// block1[1] = 0xaa
lda #$aa
sta block1+1
// memoryRemapBlock(0x80, 0x100)
// Remap [$8000-$9fff] to point to [$10000-$11fff]
ldx #$80
jsr memoryRemapBlock
// block2[2] = 0x55
// Put 0x55, 0xaainto $10002
lda #$55
sta block2+2
// block2[3] = 0xaa
lda #$aa
sta block2+3
// memoryRemap(MEMORYBLOCK_4000|MEMORYBLOCK_8000, 0x0c0, 0x080)
// Remap [$4000-$5fff] and [$8000-$9fff] to both point to [$10000-$11fff] (notice usage of page offsets)
lda #<$80
sta.z memoryRemap.upperMemoryPageOffset
lda #>$80
sta.z memoryRemap.upperMemoryPageOffset+1
ldz #MEMORYBLOCK_4000|MEMORYBLOCK_8000
lda #<$c0
sta.z memoryRemap.lowerMemoryPageOffset
lda #>$c0
sta.z memoryRemap.lowerMemoryPageOffset+1
jsr memoryRemap
// block2[4] = block1[2]
// Put 0x55, 0xaa into $10004 in a convoluted way
lda block1+2
sta block2+4
// block1[5] = block2[1]
lda block2+1
sta block1+5
// }
rts
}
// Remap a single 8K memory block in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// All the other 8K memory blocks will not be mapped and will point to their own address in the lowest 64K of the MEGA65 memory.
// blockPage: Page address of the 8K memory block to remap (ie. the block that is remapped is $100 * the passed page address.)
// memoryPage: Page address of the memory that the block should point to in the 1MB memory space of the MEGA65.
// Ie. the memory that will be pointed to is $100 * the passed page address. Only the lower 12bits of the passed value is used.
// memoryRemapBlock(byte register(X) blockPage)
memoryRemapBlock: {
.label pageOffset = 2
// pageOffset = memoryPage-blockPage
stx.z $ff
lda #<$100
sec
sbc.z $ff
sta.z pageOffset
lda #>$100
sbc #0
sta.z pageOffset+1
// block = blockPage / $20
txa
lsr
lsr
lsr
lsr
lsr
// blockBits = 1<<block
tay
lda #1
cpy #0
beq !e+
!:
asl
dey
bne !-
!e:
// memoryRemap(blockBits, pageOffset, pageOffset)
taz
lda.z pageOffset
sta.z memoryRemap.upperMemoryPageOffset
lda.z pageOffset+1
sta.z memoryRemap.upperMemoryPageOffset+1
jsr memoryRemap
// }
rts
}
// Remap some of the eight 8K memory blocks in the 64K address space of the 6502 to point somewhere else in the first 1MB memory space of the MEGA65.
// After the remapping the CPU will access the mapped memory whenever it uses instructions that access a remapped block.
// remapBlocks: Indicates which 8K blocks of the 6502 address space to remap. Each bit represents one 8K block
// - bit 0 Memory block $0000-$1fff. Use constant MEMORYBLOCK_0000.
// - bit 1 Memory block $2000-$3fff. Use constant MEMORYBLOCK_2000.
// - bit 2 Memory block $4000-$5fff. Use constant MEMORYBLOCK_4000.
// - bit 3 Memory block $6000-$7fff. Use constant MEMORYBLOCK_6000.
// - bit 4 Memory block $8000-$9fff. Use constant MEMORYBLOCK_8000.
// - bit 5 Memory block $a000-$bfff. Use constant MEMORYBLOCK_A000.
// - bit 6 Memory block $c000-$dfff. Use constant MEMORYBLOCK_C000.
// - bit 7 Memory block $e000-$ffff. Use constant MEMORYBLOCK_E000.
// lowerMemoryPageOffset: Offset that will be added to any remapped blocks in the lower 32K of memory (block 0-3).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 0 ($0000-$1fff) is remapped it will point to lowerMemoryPageOffset*$100.
// - If block 1 ($2000-$3fff) is remapped it will point to lowerMemoryPageOffset*$100 + $2000.
// - If block 2 ($4000-$5fff) is remapped it will point to lowerMemoryPageOffset*$100 + $4000.
// - If block 3 ($6000-$7fff) is remapped it will point to lowerMemoryPageOffset*$100 + $6000.
// upperMemoryPageOffset: Offset that will be added to any remapped blocks in the upper 32K of memory (block 4-7).
// The offset is a page offset (meaning it is multiplied by 0x100). Only the lower 12bits of the passed value is used.
// - If block 4 ($8000-$9fff) is remapped it will point to upperMemoryPageOffset*$100 + $8000
// - If block 5 ($a000-$bfff) is remapped it will point to upperMemoryPageOffset*$100 + $a000.
// - If block 6 ($c000-$dfff) is remapped it will point to upperMemoryPageOffset*$100 + $c000.
// - If block 7 ($e000-$ffff) is remapped it will point to upperMemoryPageOffset*$100 + $e000.
// memoryRemap(byte register(Z) remapBlocks, word zp(2) lowerMemoryPageOffset, word zp(4) upperMemoryPageOffset)
memoryRemap: {
.label aVal = $fc
.label xVal = $fd
.label yVal = $fe
.label zVal = $ff
.label __1 = 6
.label __6 = 7
.label lowerMemoryPageOffset = 2
.label upperMemoryPageOffset = 4
// <lowerMemoryPageOffset
lda.z lowerMemoryPageOffset
// *aVal = <lowerMemoryPageOffset
sta aVal
// remapBlocks << 4
tza
asl
asl
asl
asl
sta.z __1
// >lowerMemoryPageOffset
lda.z lowerMemoryPageOffset+1
// >lowerMemoryPageOffset & 0xf
and #$f
// (remapBlocks << 4) | (>lowerMemoryPageOffset & 0xf)
ora.z __1
// *xVal = (remapBlocks << 4) | (>lowerMemoryPageOffset & 0xf)
sta xVal
// <upperMemoryPageOffset
lda.z upperMemoryPageOffset
// *yVal = <upperMemoryPageOffset
sta yVal
// remapBlocks & 0xf0
tza
and #$f0
sta.z __6
// >upperMemoryPageOffset
lda.z upperMemoryPageOffset+1
// >upperMemoryPageOffset & 0xf
and #$f
// (remapBlocks & 0xf0) | (>upperMemoryPageOffset & 0xf)
ora.z __6
// *zVal = (remapBlocks & 0xf0) | (>upperMemoryPageOffset & 0xf)
sta zVal
// asm
lda aVal
ldx xVal
ldy yVal
ldz zVal
map
eom
// }
rts
}

View File

@ -0,0 +1,63 @@
(void()) main()
main: scope:[main] from
[0] phi()
[1] call memoryRemapBlock
to:main::@1
main::@1: scope:[main] from main
[2] *((const byte*) main::block1) ← (byte) $55
[3] *((const byte*) main::block1+(byte) 1) ← (byte) $aa
[4] call memoryRemapBlock
to:main::@2
main::@2: scope:[main] from main::@1
[5] *((const byte*) main::block2+(byte) 2) ← (byte) $55
[6] *((const byte*) main::block2+(byte) 3) ← (byte) $aa
[7] call memoryRemap
to:main::@3
main::@3: scope:[main] from main::@2
[8] *((const byte*) main::block2+(byte) 4) ← *((const byte*) main::block1+(byte) 2)
[9] *((const byte*) main::block1+(byte) 5) ← *((const byte*) main::block2+(byte) 1)
to:main::@return
main::@return: scope:[main] from main::@3
[10] return
to:@return
(void()) memoryRemapBlock((byte) memoryRemapBlock::blockPage , (word) memoryRemapBlock::memoryPage)
memoryRemapBlock: scope:[memoryRemapBlock] from main main::@1
[11] (byte) memoryRemapBlock::blockPage#2 ← phi( main/(byte) $40 main::@1/(byte) $80 )
[12] (word) memoryRemapBlock::pageOffset#0 ← (word) $100 - (byte) memoryRemapBlock::blockPage#2
[13] (byte) memoryRemapBlock::block#0 ← (byte) memoryRemapBlock::blockPage#2 >> (byte) 5
[14] (byte) memoryRemapBlock::blockBits#0 ← (byte) 1 << (byte) memoryRemapBlock::block#0
[15] (byte) memoryRemap::remapBlocks#1 ← (byte) memoryRemapBlock::blockBits#0
[16] (word) memoryRemap::lowerMemoryPageOffset#1 ← (word) memoryRemapBlock::pageOffset#0
[17] (word) memoryRemap::upperMemoryPageOffset#1 ← (word) memoryRemapBlock::pageOffset#0
[18] call memoryRemap
to:memoryRemapBlock::@return
memoryRemapBlock::@return: scope:[memoryRemapBlock] from memoryRemapBlock
[19] return
to:@return
(void()) memoryRemap((byte) memoryRemap::remapBlocks , (word) memoryRemap::lowerMemoryPageOffset , (word) memoryRemap::upperMemoryPageOffset)
memoryRemap: scope:[memoryRemap] from main::@2 memoryRemapBlock
[20] (word) memoryRemap::upperMemoryPageOffset#2 ← phi( main::@2/(byte) $80 memoryRemapBlock/(word) memoryRemap::upperMemoryPageOffset#1 )
[20] (byte) memoryRemap::remapBlocks#2 ← phi( main::@2/(const nomodify byte) MEMORYBLOCK_4000|(const nomodify byte) MEMORYBLOCK_8000 memoryRemapBlock/(byte) memoryRemap::remapBlocks#1 )
[20] (word) memoryRemap::lowerMemoryPageOffset#2 ← phi( main::@2/(byte) $c0 memoryRemapBlock/(word) memoryRemap::lowerMemoryPageOffset#1 )
[21] (byte~) memoryRemap::$0 ← < (word) memoryRemap::lowerMemoryPageOffset#2
[22] *((const byte*) memoryRemap::aVal) ← (byte~) memoryRemap::$0
[23] (byte~) memoryRemap::$1 ← (byte) memoryRemap::remapBlocks#2 << (byte) 4
[24] (byte~) memoryRemap::$2 ← > (word) memoryRemap::lowerMemoryPageOffset#2
[25] (byte~) memoryRemap::$3 ← (byte~) memoryRemap::$2 & (byte) $f
[26] (byte~) memoryRemap::$4 ← (byte~) memoryRemap::$1 | (byte~) memoryRemap::$3
[27] *((const byte*) memoryRemap::xVal) ← (byte~) memoryRemap::$4
[28] (byte~) memoryRemap::$5 ← < (word) memoryRemap::upperMemoryPageOffset#2
[29] *((const byte*) memoryRemap::yVal) ← (byte~) memoryRemap::$5
[30] (byte~) memoryRemap::$6 ← (byte) memoryRemap::remapBlocks#2 & (byte) $f0
[31] (byte~) memoryRemap::$7 ← > (word) memoryRemap::upperMemoryPageOffset#2
[32] (byte~) memoryRemap::$8 ← (byte~) memoryRemap::$7 & (byte) $f
[33] (byte~) memoryRemap::$9 ← (byte~) memoryRemap::$6 | (byte~) memoryRemap::$8
[34] *((const byte*) memoryRemap::zVal) ← (byte~) memoryRemap::$9
asm { ldaaVal ldxxVal ldyyVal ldzzVal map eom }
to:memoryRemap::@return
memoryRemap::@return: scope:[memoryRemap] from memoryRemap
[36] return
to:@return

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,346 @@
(byte) MEGA65_VICIV::ALPHADELAY
(byte) MEGA65_VICIV::B0PIX
(byte) MEGA65_VICIV::B0_ADDR
(byte) MEGA65_VICIV::B1PIX
(byte) MEGA65_VICIV::B1_ADDR
(byte) MEGA65_VICIV::B2PIX
(byte) MEGA65_VICIV::B2_ADDR
(byte) MEGA65_VICIV::B3PIX
(byte) MEGA65_VICIV::B3_ADDR
(byte) MEGA65_VICIV::B4PIX
(byte) MEGA65_VICIV::B4_ADDR
(byte) MEGA65_VICIV::B5PIX
(byte) MEGA65_VICIV::B5_ADDR
(byte) MEGA65_VICIV::B6PIX
(byte) MEGA65_VICIV::B6_ADDR
(byte) MEGA65_VICIV::B7PIX
(byte) MEGA65_VICIV::B7_ADDR
(byte) MEGA65_VICIV::BBDRPOS_HI
(byte) MEGA65_VICIV::BBDRPOS_LO
(byte) MEGA65_VICIV::BG_COLOR
(byte) MEGA65_VICIV::BG_COLOR1
(byte) MEGA65_VICIV::BG_COLOR2
(byte) MEGA65_VICIV::BG_COLOR3
(byte) MEGA65_VICIV::BORDER_COLOR
(byte) MEGA65_VICIV::BP16ENS
(byte) MEGA65_VICIV::BPCOMP
(byte) MEGA65_VICIV::BPX
(byte) MEGA65_VICIV::BPY
(byte) MEGA65_VICIV::CHARPTR_HILO
(byte) MEGA65_VICIV::CHARPTR_LOHI
(byte) MEGA65_VICIV::CHARPTR_LOLO
(byte) MEGA65_VICIV::CHARSTEP_HI
(byte) MEGA65_VICIV::CHARSTEP_LO
(byte) MEGA65_VICIV::CHRCOUNT
(byte) MEGA65_VICIV::CHRXSCL
(byte) MEGA65_VICIV::CHRYSCL
(byte) MEGA65_VICIV::COLPTR_HI
(byte) MEGA65_VICIV::COLPTR_LO
(byte) MEGA65_VICIV::CONTROL1
(byte) MEGA65_VICIV::CONTROL2
(byte) MEGA65_VICIV::CONTROLA
(byte) MEGA65_VICIV::CONTROLB
(byte) MEGA65_VICIV::CONTROLC
(byte) MEGA65_VICIV::DEBUG1
(byte) MEGA65_VICIV::DEBUGX
(byte) MEGA65_VICIV::DEBUGXY
(byte) MEGA65_VICIV::DEBUGY
(byte) MEGA65_VICIV::FNRASTER_HI
(byte) MEGA65_VICIV::FNRASTER_LO
(byte) MEGA65_VICIV::HPOS
(byte) MEGA65_VICIV::IRQ_ENABLE
(byte) MEGA65_VICIV::IRQ_STATUS
(byte) MEGA65_VICIV::KEY
(byte) MEGA65_VICIV::LIGHTPEN_X
(byte) MEGA65_VICIV::LIGHTPEN_Y
(byte) MEGA65_VICIV::MEMORY
(byte) MEGA65_VICIV::PALSEL
(byte) MEGA65_VICIV::RASLINE0
(byte) MEGA65_VICIV::RASTER
(byte) MEGA65_VICIV::ROWCOUNT
(byte) MEGA65_VICIV::RSTCMP
(byte) MEGA65_VICIV::RSTCOMP
(byte) MEGA65_VICIV::SBPDEBUG
(byte) MEGA65_VICIV::SCRNPTR_HIHI
(byte) MEGA65_VICIV::SCRNPTR_HILO
(byte) MEGA65_VICIV::SCRNPTR_LOHI
(byte) MEGA65_VICIV::SCRNPTR_LOLO
(byte) MEGA65_VICIV::SIDBDRWD_HI
(byte) MEGA65_VICIV::SIDBDRWD_LO
(byte) MEGA65_VICIV::SPR16EN
(byte) MEGA65_VICIV::SPRALPHAVAL
(byte) MEGA65_VICIV::SPRENALPHA
(byte) MEGA65_VICIV::SPRENV400
(byte) MEGA65_VICIV::SPRHGHT
(byte) MEGA65_VICIV::SPRHGTEN
(byte) MEGA65_VICIV::SPRITE0_COLOR
(byte) MEGA65_VICIV::SPRITE0_X
(byte) MEGA65_VICIV::SPRITE0_Y
(byte) MEGA65_VICIV::SPRITE1_COLOR
(byte) MEGA65_VICIV::SPRITE1_X
(byte) MEGA65_VICIV::SPRITE1_Y
(byte) MEGA65_VICIV::SPRITE2_COLOR
(byte) MEGA65_VICIV::SPRITE2_X
(byte) MEGA65_VICIV::SPRITE2_Y
(byte) MEGA65_VICIV::SPRITE3_COLOR
(byte) MEGA65_VICIV::SPRITE3_X
(byte) MEGA65_VICIV::SPRITE3_Y
(byte) MEGA65_VICIV::SPRITE4_COLOR
(byte) MEGA65_VICIV::SPRITE4_X
(byte) MEGA65_VICIV::SPRITE4_Y
(byte) MEGA65_VICIV::SPRITE5_COLOR
(byte) MEGA65_VICIV::SPRITE5_X
(byte) MEGA65_VICIV::SPRITE5_Y
(byte) MEGA65_VICIV::SPRITE6_COLOR
(byte) MEGA65_VICIV::SPRITE6_X
(byte) MEGA65_VICIV::SPRITE6_Y
(byte) MEGA65_VICIV::SPRITE7_COLOR
(byte) MEGA65_VICIV::SPRITE7_X
(byte) MEGA65_VICIV::SPRITE7_Y
(byte) MEGA65_VICIV::SPRITES_BG_COLLISION
(byte) MEGA65_VICIV::SPRITES_COLLISION
(byte) MEGA65_VICIV::SPRITES_ENABLE
(byte) MEGA65_VICIV::SPRITES_EXPAND_X
(byte) MEGA65_VICIV::SPRITES_EXPAND_Y
(byte) MEGA65_VICIV::SPRITES_MC
(byte) MEGA65_VICIV::SPRITES_MCOLOR1
(byte) MEGA65_VICIV::SPRITES_MCOLOR2
(byte) MEGA65_VICIV::SPRITES_PRIORITY
(byte) MEGA65_VICIV::SPRITES_XMSB
(byte) MEGA65_VICIV::SPRPTRADR_HILO
(byte) MEGA65_VICIV::SPRPTRADR_LOHI
(byte) MEGA65_VICIV::SPRPTRADR_LOLO
(byte) MEGA65_VICIV::SPRX64EN
(byte) MEGA65_VICIV::SPRXSMSBS
(byte) MEGA65_VICIV::SPRYSMSBSM
(byte) MEGA65_VICIV::SRPYMSBS
(byte) MEGA65_VICIV::SYNCPOL
(byte) MEGA65_VICIV::TBDRPOS_HI
(byte) MEGA65_VICIV::TBDRPOS_LO
(byte) MEGA65_VICIV::TEXTXPOS_HI
(byte) MEGA65_VICIV::TEXTXPOS_LO
(byte) MEGA65_VICIV::TEXTYPOS_HI
(byte) MEGA65_VICIV::TEXTYPOS_LO
(byte) MEGA65_VICIV::UNUSED
(byte) MEGA65_VICIV::VPOS
(byte) MEGA65_VICIV::VSYNDEL
(byte) MEGA65_VICIV::XPOS_HI
(byte) MEGA65_VICIV::XPOS_LO
(const nomodify byte) MEMORYBLOCK_4000 = (byte) 4
(const nomodify byte) MEMORYBLOCK_8000 = (byte) $10
(byte) MOS4569_VICIII::B0PIX
(byte) MOS4569_VICIII::B0_ADDR
(byte) MOS4569_VICIII::B1PIX
(byte) MOS4569_VICIII::B1_ADDR
(byte) MOS4569_VICIII::B2PIX
(byte) MOS4569_VICIII::B2_ADDR
(byte) MOS4569_VICIII::B3PIX
(byte) MOS4569_VICIII::B3_ADDR
(byte) MOS4569_VICIII::B4PIX
(byte) MOS4569_VICIII::B4_ADDR
(byte) MOS4569_VICIII::B5PIX
(byte) MOS4569_VICIII::B5_ADDR
(byte) MOS4569_VICIII::B6PIX
(byte) MOS4569_VICIII::B6_ADDR
(byte) MOS4569_VICIII::B7PIX
(byte) MOS4569_VICIII::B7_ADDR
(byte) MOS4569_VICIII::BG_COLOR
(byte) MOS4569_VICIII::BG_COLOR1
(byte) MOS4569_VICIII::BG_COLOR2
(byte) MOS4569_VICIII::BG_COLOR3
(byte) MOS4569_VICIII::BORDER_COLOR
(byte) MOS4569_VICIII::BPCOMP
(byte) MOS4569_VICIII::BPX
(byte) MOS4569_VICIII::BPY
(byte) MOS4569_VICIII::CONTROL1
(byte) MOS4569_VICIII::CONTROL2
(byte) MOS4569_VICIII::CONTROLA
(byte) MOS4569_VICIII::CONTROLB
(byte) MOS4569_VICIII::HPOS
(byte) MOS4569_VICIII::IRQ_ENABLE
(byte) MOS4569_VICIII::IRQ_STATUS
(byte) MOS4569_VICIII::KEY
(byte) MOS4569_VICIII::LIGHTPEN_X
(byte) MOS4569_VICIII::LIGHTPEN_Y
(byte) MOS4569_VICIII::MEMORY
(byte) MOS4569_VICIII::RASTER
(byte) MOS4569_VICIII::SPRITE0_COLOR
(byte) MOS4569_VICIII::SPRITE0_X
(byte) MOS4569_VICIII::SPRITE0_Y
(byte) MOS4569_VICIII::SPRITE1_COLOR
(byte) MOS4569_VICIII::SPRITE1_X
(byte) MOS4569_VICIII::SPRITE1_Y
(byte) MOS4569_VICIII::SPRITE2_COLOR
(byte) MOS4569_VICIII::SPRITE2_X
(byte) MOS4569_VICIII::SPRITE2_Y
(byte) MOS4569_VICIII::SPRITE3_COLOR
(byte) MOS4569_VICIII::SPRITE3_X
(byte) MOS4569_VICIII::SPRITE3_Y
(byte) MOS4569_VICIII::SPRITE4_COLOR
(byte) MOS4569_VICIII::SPRITE4_X
(byte) MOS4569_VICIII::SPRITE4_Y
(byte) MOS4569_VICIII::SPRITE5_COLOR
(byte) MOS4569_VICIII::SPRITE5_X
(byte) MOS4569_VICIII::SPRITE5_Y
(byte) MOS4569_VICIII::SPRITE6_COLOR
(byte) MOS4569_VICIII::SPRITE6_X
(byte) MOS4569_VICIII::SPRITE6_Y
(byte) MOS4569_VICIII::SPRITE7_COLOR
(byte) MOS4569_VICIII::SPRITE7_X
(byte) MOS4569_VICIII::SPRITE7_Y
(byte) MOS4569_VICIII::SPRITES_BG_COLLISION
(byte) MOS4569_VICIII::SPRITES_COLLISION
(byte) MOS4569_VICIII::SPRITES_ENABLE
(byte) MOS4569_VICIII::SPRITES_EXPAND_X
(byte) MOS4569_VICIII::SPRITES_EXPAND_Y
(byte) MOS4569_VICIII::SPRITES_MC
(byte) MOS4569_VICIII::SPRITES_MCOLOR1
(byte) MOS4569_VICIII::SPRITES_MCOLOR2
(byte) MOS4569_VICIII::SPRITES_PRIORITY
(byte) MOS4569_VICIII::SPRITES_XMSB
(byte) MOS4569_VICIII::UNUSED
(byte) MOS4569_VICIII::VPOS
(byte) MOS6526_CIA::INTERRUPT
(byte) MOS6526_CIA::PORT_A
(byte) MOS6526_CIA::PORT_A_DDR
(byte) MOS6526_CIA::PORT_B
(byte) MOS6526_CIA::PORT_B_DDR
(byte) MOS6526_CIA::SERIAL_DATA
(word) MOS6526_CIA::TIMER_A
(byte) MOS6526_CIA::TIMER_A_CONTROL
(word) MOS6526_CIA::TIMER_B
(byte) MOS6526_CIA::TIMER_B_CONTROL
(byte) MOS6526_CIA::TOD_10THS
(byte) MOS6526_CIA::TOD_HOURS
(byte) MOS6526_CIA::TOD_MIN
(byte) MOS6526_CIA::TOD_SEC
(byte) MOS6569_VICII::BG_COLOR
(byte) MOS6569_VICII::BG_COLOR1
(byte) MOS6569_VICII::BG_COLOR2
(byte) MOS6569_VICII::BG_COLOR3
(byte) MOS6569_VICII::BORDER_COLOR
(byte) MOS6569_VICII::CONTROL1
(byte) MOS6569_VICII::CONTROL2
(byte) MOS6569_VICII::IRQ_ENABLE
(byte) MOS6569_VICII::IRQ_STATUS
(byte) MOS6569_VICII::LIGHTPEN_X
(byte) MOS6569_VICII::LIGHTPEN_Y
(byte) MOS6569_VICII::MEMORY
(byte) MOS6569_VICII::RASTER
(byte) MOS6569_VICII::SPRITE0_COLOR
(byte) MOS6569_VICII::SPRITE0_X
(byte) MOS6569_VICII::SPRITE0_Y
(byte) MOS6569_VICII::SPRITE1_COLOR
(byte) MOS6569_VICII::SPRITE1_X
(byte) MOS6569_VICII::SPRITE1_Y
(byte) MOS6569_VICII::SPRITE2_COLOR
(byte) MOS6569_VICII::SPRITE2_X
(byte) MOS6569_VICII::SPRITE2_Y
(byte) MOS6569_VICII::SPRITE3_COLOR
(byte) MOS6569_VICII::SPRITE3_X
(byte) MOS6569_VICII::SPRITE3_Y
(byte) MOS6569_VICII::SPRITE4_COLOR
(byte) MOS6569_VICII::SPRITE4_X
(byte) MOS6569_VICII::SPRITE4_Y
(byte) MOS6569_VICII::SPRITE5_COLOR
(byte) MOS6569_VICII::SPRITE5_X
(byte) MOS6569_VICII::SPRITE5_Y
(byte) MOS6569_VICII::SPRITE6_COLOR
(byte) MOS6569_VICII::SPRITE6_X
(byte) MOS6569_VICII::SPRITE6_Y
(byte) MOS6569_VICII::SPRITE7_COLOR
(byte) MOS6569_VICII::SPRITE7_X
(byte) MOS6569_VICII::SPRITE7_Y
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
(byte) MOS6569_VICII::SPRITES_COLLISION
(byte) MOS6569_VICII::SPRITES_ENABLE
(byte) MOS6569_VICII::SPRITES_EXPAND_X
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
(byte) MOS6569_VICII::SPRITES_MC
(byte) MOS6569_VICII::SPRITES_MCOLOR1
(byte) MOS6569_VICII::SPRITES_MCOLOR2
(byte) MOS6569_VICII::SPRITES_PRIORITY
(byte) MOS6569_VICII::SPRITES_XMSB
(byte) MOS6581_SID::CH1_ATTACK_DECAY
(byte) MOS6581_SID::CH1_CONTROL
(word) MOS6581_SID::CH1_FREQ
(word) MOS6581_SID::CH1_PULSE_WIDTH
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
(byte) MOS6581_SID::CH2_ATTACK_DECAY
(byte) MOS6581_SID::CH2_CONTROL
(word) MOS6581_SID::CH2_FREQ
(word) MOS6581_SID::CH2_PULSE_WIDTH
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
(byte) MOS6581_SID::CH3_ATTACK_DECAY
(byte) MOS6581_SID::CH3_CONTROL
(byte) MOS6581_SID::CH3_ENV
(word) MOS6581_SID::CH3_FREQ
(byte) MOS6581_SID::CH3_OSC
(word) MOS6581_SID::CH3_PULSE_WIDTH
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
(byte) MOS6581_SID::FILTER_SETUP
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(void()) main()
(label) main::@1
(label) main::@2
(label) main::@3
(label) main::@return
(const byte*) main::block1 = (byte*) 16384
(const byte*) main::block2 = (byte*) 32768
(void()) memoryRemap((byte) memoryRemap::remapBlocks , (word) memoryRemap::lowerMemoryPageOffset , (word) memoryRemap::upperMemoryPageOffset)
(byte~) memoryRemap::$0 reg byte a 202.0
(byte~) memoryRemap::$1 zp[1]:6 67.33333333333333
(byte~) memoryRemap::$2 reg byte a 202.0
(byte~) memoryRemap::$3 reg byte a 202.0
(byte~) memoryRemap::$4 reg byte a 202.0
(byte~) memoryRemap::$5 reg byte a 202.0
(byte~) memoryRemap::$6 zp[1]:7 67.33333333333333
(byte~) memoryRemap::$7 reg byte a 202.0
(byte~) memoryRemap::$8 reg byte a 202.0
(byte~) memoryRemap::$9 reg byte a 202.0
(label) memoryRemap::@return
(const byte*) memoryRemap::aVal = (byte*) 252
(word) memoryRemap::lowerMemoryPageOffset
(word) memoryRemap::lowerMemoryPageOffset#1 lowerMemoryPageOffset zp[2]:2 11.0
(word) memoryRemap::lowerMemoryPageOffset#2 lowerMemoryPageOffset zp[2]:2 53.25
(byte) memoryRemap::remapBlocks
(byte) memoryRemap::remapBlocks#1 reg byte z 7.333333333333333
(byte) memoryRemap::remapBlocks#2 reg byte z 21.299999999999997
(word) memoryRemap::upperMemoryPageOffset
(word) memoryRemap::upperMemoryPageOffset#1 upperMemoryPageOffset zp[2]:4 22.0
(word) memoryRemap::upperMemoryPageOffset#2 upperMemoryPageOffset zp[2]:4 19.363636363636363
(const byte*) memoryRemap::xVal = (byte*) 253
(const byte*) memoryRemap::yVal = (byte*) 254
(const byte*) memoryRemap::zVal = (byte*) 255
(void()) memoryRemapBlock((byte) memoryRemapBlock::blockPage , (word) memoryRemapBlock::memoryPage)
(label) memoryRemapBlock::@return
(byte) memoryRemapBlock::block
(byte) memoryRemapBlock::block#0 reg byte a 22.0
(byte) memoryRemapBlock::blockBits
(byte) memoryRemapBlock::blockBits#0 reg byte a 22.0
(byte) memoryRemapBlock::blockPage
(byte) memoryRemapBlock::blockPage#2 reg byte x 11.0
(word) memoryRemapBlock::memoryPage
(word) memoryRemapBlock::pageOffset
(word) memoryRemapBlock::pageOffset#0 pageOffset zp[2]:2 6.6000000000000005
reg byte x [ memoryRemapBlock::blockPage#2 ]
zp[2]:2 [ memoryRemap::lowerMemoryPageOffset#2 memoryRemap::lowerMemoryPageOffset#1 memoryRemapBlock::pageOffset#0 ]
reg byte z [ memoryRemap::remapBlocks#2 memoryRemap::remapBlocks#1 ]
zp[2]:4 [ memoryRemap::upperMemoryPageOffset#2 memoryRemap::upperMemoryPageOffset#1 ]
reg byte a [ memoryRemapBlock::block#0 ]
reg byte a [ memoryRemapBlock::blockBits#0 ]
reg byte a [ memoryRemap::$0 ]
zp[1]:6 [ memoryRemap::$1 ]
reg byte a [ memoryRemap::$2 ]
reg byte a [ memoryRemap::$3 ]
reg byte a [ memoryRemap::$4 ]
reg byte a [ memoryRemap::$5 ]
zp[1]:7 [ memoryRemap::$6 ]
reg byte a [ memoryRemap::$7 ]
reg byte a [ memoryRemap::$8 ]
reg byte a [ memoryRemap::$9 ]

View File

@ -1,7 +1,10 @@
// Raster65 Demo Implementation in C
// Based on RASTER65 assembler demo made by DEFT in 2015
// Raster65 Demo re-implementation in C by Jesper Gravgaard
// Based on RASTER65 assembler demo made in 2015 and updated in 2020 by DEFT
// https://mega.scryptos.com/sharefolder/MEGA/MEGA65+filehost
// https://www.forum64.de/index.php?thread/104591-xemu-vic-iv-implementation-update/&postID=1560511#post1560511
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.cpu _45gs02
// MEGA65 platform executable starting in C64 mode.
.file [name="raster65.prg", type="prg", segments="Program"]
@ -215,7 +218,7 @@ irq: {
ldy #0
lda (scroll_ptr),y
inw.z scroll_ptr
// if(nxt==0)
// if(nxt == 0)
cmp #0
bne __b39
// scroll_ptr = SCROLL_TEXT

View File

@ -2398,10 +2398,13 @@ Allocated zp[1]:38 [ irq::raster#0 ]
INITIAL ASM
Target platform is mega65_c64 / MEGA45GS02
// File Comments
// Raster65 Demo Implementation in C
// Based on RASTER65 assembler demo made by DEFT in 2015
// Raster65 Demo re-implementation in C by Jesper Gravgaard
// Based on RASTER65 assembler demo made in 2015 and updated in 2020 by DEFT
// https://mega.scryptos.com/sharefolder/MEGA/MEGA65+filehost
// https://www.forum64.de/index.php?thread/104591-xemu-vic-iv-implementation-update/&postID=1560511#post1560511
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform executable starting in C64 mode.
@ -3615,10 +3618,13 @@ Allocated (was zp[1]:28) zp[1]:11 [ greet_idx ]
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Raster65 Demo Implementation in C
// Based on RASTER65 assembler demo made by DEFT in 2015
// Raster65 Demo re-implementation in C by Jesper Gravgaard
// Based on RASTER65 assembler demo made in 2015 and updated in 2020 by DEFT
// https://mega.scryptos.com/sharefolder/MEGA/MEGA65+filehost
// https://www.forum64.de/index.php?thread/104591-xemu-vic-iv-implementation-update/&postID=1560511#post1560511
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform executable starting in C64 mode.
@ -4580,9 +4586,9 @@ Removing instruction jmp __b5
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction ldy #0
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Fixing long branch [135] bne __b2 to beq
Fixing long branch [145] bcc __b17 to bcs
Fixing long branch [152] bne __b19 to beq
Fixing long branch [138] bne __b2 to beq
Fixing long branch [148] bcc __b17 to bcs
Fixing long branch [155] bne __b19 to beq
FINAL SYMBOL TABLE
(const nomodify struct MOS6526_CIA*) CIA1 = (struct MOS6526_CIA*) 56320
@ -5121,10 +5127,13 @@ FINAL ASSEMBLER
Score: 9963
// File Comments
// Raster65 Demo Implementation in C
// Based on RASTER65 assembler demo made by DEFT in 2015
// Raster65 Demo re-implementation in C by Jesper Gravgaard
// Based on RASTER65 assembler demo made in 2015 and updated in 2020 by DEFT
// https://mega.scryptos.com/sharefolder/MEGA/MEGA65+filehost
// https://www.forum64.de/index.php?thread/104591-xemu-vic-iv-implementation-update/&postID=1560511#post1560511
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform executable starting in C64 mode.
@ -5406,7 +5415,7 @@ irq: {
lda (scroll_ptr),y
// [36] (volatile byte*) scroll_ptr ← ++ (volatile byte*) scroll_ptr -- pbuz1=_inc_pbuz1
inw.z scroll_ptr
// if(nxt==0)
// if(nxt == 0)
// [37] if((byte) irq::nxt#0!=(byte) 0) goto irq::@39 -- vbuaa_neq_0_then_la1
cmp #0
bne __b39

View File

@ -1,4 +1,7 @@
// Hello World for MEGA 65 - putting chars directly to the screen
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
.cpu _45gs02
// MEGA65 platform PRG executable starting in MEGA65 mode.
.file [name="test-vic4.prg", type="prg", segments="Program"]

View File

@ -755,6 +755,9 @@ INITIAL ASM
Target platform is mega65 / MEGA45GS02
// File Comments
// Hello World for MEGA 65 - putting chars directly to the screen
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform PRG executable starting in MEGA65 mode.
@ -912,6 +915,9 @@ Uplifting [] best 1050 combination
ASSEMBLER BEFORE OPTIMIZATION
// File Comments
// Hello World for MEGA 65 - putting chars directly to the screen
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform PRG executable starting in MEGA65 mode.
@ -1359,6 +1365,9 @@ Score: 960
// File Comments
// Hello World for MEGA 65 - putting chars directly to the screen
// MEGA65 Registers and Constants
// The MOS 6526 Complex Interface Adapter (CIA)
// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Upstart
.cpu _45gs02
// MEGA65 platform PRG executable starting in MEGA65 mode.