Skip to content

Commit

Permalink
Naprawiony plik DATA.ASM
Browse files Browse the repository at this point in the history
  • Loading branch information
NowinskiK committed Dec 24, 2022
1 parent 2daf7e8 commit b336d2c
Show file tree
Hide file tree
Showing 14 changed files with 539 additions and 423 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ Folder [srcPC](./srcPC/) zawiera kompletną solucję i projekt pozwalający skom

Jeśli chcesz uruchomić program z kodu źródłowego pod platformą PC - [w tym folderze](./doc/) znajdziesz prezentację opisującą krok po kroku jak przygotować środowisko.

# Some numbers
- 24 x 14 tiles - each screen

5 changes: 4 additions & 1 deletion compare.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
$orgFile = ".\srcQA\bin\DANGEROUS.xex"
$newFile = ".\srcPC\Release\DC.xex"

$orgFile = ".\srcQA\bin\DANGEROUS.xex-8000.bin"
$newFile = ".\srcPC\DATA.bin"

$org = [System.IO.File]::ReadAllBytes($orgFile)
$new = [System.IO.File]::ReadAllBytes($newFile)

Expand Down Expand Up @@ -29,7 +32,7 @@ do {
## Show body
$i=0
$lines=0
$orgStart = 0x8d59-176
$orgStart = 0x0b9e+4
do {
$orgLine = ($org[($i+$orgStart)..($orgStart+15+$i)]|ForEach-Object ToString X2) -join ' '
Write-Host (" !hex $orgLine ")
Expand Down
70 changes: 70 additions & 0 deletions doc/QA_to_C64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Mapping between Quick Assembler & C64 Studio

## DTA A(adres)
QA generuje słowo (2 bajty) wypełniając je podaną wartością.
QA: `dta a(leg_t)`
C64: `!byte <leg_t, >leg_t`
`!word (leg_t)`

## DTA B(bajt)
QA generuje bajt.
QA: `dta b($70),b(0)`
C64: `!byte $70, 0`

`dta b(%01100111)`

## DTA C'tekst'
QA generuje ciąg kodów [ATASCII](https://en.wikipedia.org/wiki/ATASCII) podanych znaków.
QA: `dta c'Sejf '`
QA DATA: `53 65 6A 66 20`
C64: `!text "Sejf "`
C64 DATA: `53 65 6A 66 20`


## DTA D'tekst' - rozbieznosci!
QA generuje ciąg kodów ekranowych (internal) podanych znaków.
QA: ` dta d' koniec GRY '`
QA DATA: `00 00 00 6B 6F 6E 69 65 63 00 27 32 39 00 ...`
C64: `!TEXT " koniec GRY "`
C64 TEXT DATA: `20 20 20 6B 6F 6E 69 65 63 00 47 52 59 20 ...`
C64: `!PET " koniec GRY "`
C64 PET DATA: `20 20 20 4B 4F 4E 49 45 43 20 C7 D2 D9 20 ...`
C64: `!SCR " koniec GRY "`
C64 SCR DATA: `20 20 20 0B 0F 0E 09 05 03 20 47 52 59 20 ...`
C64: `!RAW " koniec GRY "`
C64 RAW DATA: `20 20 20 6B 6F 6E 69 65 63 00 47 52 59 20 ...`

> Ani `!text`, ani `!pet` nie są prawidłowym odzwierciedleniem komendy `DTA D` z QA.

## DTA L(adres)
QA generuje młodszy bajt z podanej wartości.
QA: ``
C64: ``


## DTA H(adres)
QA generuje starszy bajt z podanej wartości.
QA: ``
C64: ``

## ORG & ICL
QA:
```
ORG $600
ICL 'D8:PG8.TXT'
```
C64:
```
* = $0600
!bin "fonty\b.fnt",,6
!source "DATA-QA.asm"
```

# ATASCII
https://en.wikipedia.org/wiki/ATASCII
41-4F = A-O
50-5A = P-Z
61-6F = a-o
70-7A = p-z

10 changes: 10 additions & 0 deletions remove-header.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$header_len = 6
$File = ".\srcPC\fonty\b.fnt";
$TargetFile = ".\srcPC\fonty\b-tiles.chr"

$b = [System.IO.File]::ReadAllBytes($File)
$len = $b.Length
$block = $b[$header_len..($len - 1)]
[System.IO.File]::WriteAllBytes($TargetFile, $block)


4 changes: 2 additions & 2 deletions srcPC/!main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ cz_fnt = $7c00


*=$8000
;!source "DATA.asm"
!source "DATA-QA.asm"
!source "DATA.asm"
;!source "DATA-QA.asm"

* = $a000
!source "DC.asm"
Expand Down
11 changes: 11 additions & 0 deletions srcPC/ATASCII.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* = $1000
!CONVTAB scr
;!text "koniec GRY!"

!CT 'A',$21,'B',$22,'C',$23,'D',$24,'E',$25,'F',$26,'G',$27,'H',$28,'I',$29,'J',$2A,'K',$2B,'L',$2C,'M',$2D,'N',$2E,'O',$2F,'P',$30,'Q',$31,'R',$32,'S',$33,
!CT 'T',$34,'U',$35,'V',$36,'W',$37,'X',$38,'Y',$39,'Z',$40,
!CT ' ',$00,'0',5,'1',6,'2',7,'3',8,'4',9,'5',10,'6',11,'7',12,'8',13,'9',14

!text "--- koniec GRY!"
!scr "--- koniec GRY!"
!fill 8,$ff
Loading

0 comments on commit b336d2c

Please sign in to comment.