ibisum wrote: Sun Nov 16, 2025 1:10 pm
Nice game.
Monos' merit
ibisum wrote: Sun Nov 16, 2025 1:10 pm
Is it BASIC?
It is 100% 6502 code. We can read in issue one of Didier's oric-mag :"This time, the development didn’t use CC65 or OSDK, but VBCC with a pure 6502 assembly, code please!"
ibisum wrote: Sun Nov 16, 2025 1:10 pm
Would be interesting to hear more about the mod process to add color and so on ..
1- Disassemble the code using oric-explorer. (code extract bellow)
Code: Select all
$0500 AD 6A 02 LDA $026A .j.
$0503 29 FE AND #$FE ).
$0505 8D 6A 02 STA $026A .j.
$0508 AD 6A 02 LDA $026A .j.
$050B 09 08 ORA #$08 ..
$050D 8D 6A 02 STA $026A .j.
$0510 4C 14 05 JMP $0514 L..
$0513 01 A9 ORA ($A9,X) ..
$0515 01 8D ORA ($8D,X) ..
$0517 13 ??? .
$0518 05 AD ORA $AD ..
$051A B6 E4 LDX $E4,Y ..
$051C C9 8E CMP #$8E ..
$051E D0 05 BNE $0525 ..
$0520 A9 00 LDA #$00 ..
$0522 8D 13 05 STA $0513 ...
$0525 EA NOP .
$0526 AD 13 05 LDA $0513 ...
$0529 F0 00 BEQ $052B ..
2- Rebuilt a source code (same code extract as above but with labels)
Code: Select all
deb_
LDA $026A ;$0500 AD 6A 02
AND #$FE ;$0503 29 FE
STA $026A ;$0505 8D 6A 02
LDA $026A ;$0508 AD 6A 02
ORA #$08 ;$050B 09 08
STA $026A ;$050D 8D 6A 02
JMP jp_0514 ;$0510 4C 14 05
fl_513
.byt $00 ;$0513 00
jp_0514
LDA #$01 ;$0514 A9 01
STA fl_513 ;$0516 8D 13 05
LDA $E4B6 ;$0519 AD B6 E4
CMP #$8E ;$051C C9 8E
BNE bn_0525 ;$051E D0 05
LDA #$00 ;$0520 A9 00
STA fl_513 ;$0522 8D 13 05
bn_0525
NOP ;$0525 EA
LDA fl_513 ;$0526 AD 13 05
BEQ be_052B ;$0529 F0 00
To do this, I had to modify, by means of labels, every call/reference to an address located between the start address and the end address of the code.
Example: BNE $0525 became BNE bn_0525 or JMP $0514 became JMP jp_0514 (The important thing is not to forget to add these labels before the code located at $0525 or $0514

You also need to pay attention to the type of code in which the address does not appear directly.
Code: Select all
$05CF A9 65 LDA #$65 .e
$05D1 85 F0 STA $F0 ..
$05D3 A9 26 LDA #$26 .&
$05D5 85 F1 STA $F1 ..
In the example above, it is not immediately obvious that the address $2665 is being used.
You need to translate this into:
Code: Select all
be_05CF
LDA #<dta_2665 ;$05CF A9 65
STA $F0 ;$05D1 85 F0
LDA #>dta_2665 ;$05D3 A9 26
STA $F1 ;$05D5 85 F1 ;$F0-F1 <== $2665
dta_2665
.byt $00,$00,$02,$02,$02,$02,$02,$00,$02,$02,$02 ;$2665
.byt $03,$03,$03,$02,$02,$03,$03,$03,$01,$01,$01,$03,$02,$01,$01,$01 ;$2670
.byt $01,$01,$24,$01,$02,$01,$01,$01,$01,$01,$01,$01,$02,$02,$02,$02 ;$2680
Another important point is understanding how the data is organized. Below, as an example, are the beginnings of the different data included between addresses $1825 and $1CAC.
Code: Select all
dta_1825 ; general map level 0
.byt $00,$02,$02,$04,$0B,$00,$00,$00 ;$1825
...
dta_1865 ;general map level 1
.byt $0F,$08,$FF,$FF,$FF,$FF,$FF,$FF ;$1865
...
...
dta_18E5 ;general map level 3
.byt $FF,$08,$FF,$0F,$FF,$FF,$FF,$FF ;$18E5
dta_1925 ; detail map room model 0
.byt $02,$02,$02,$02,$02,$02,$02,$02 ;$1925
...
; Plan détail modèle 7
.byt $00,$00,$02,$01,$01,$02,$00,$00 ;$1AE5
...
; detail map room model 0E
.byt $00,$00,$02,$01,$01,$02,$00,$00 ;$1CA5
3 - Once the source code is validated (no more bugs…), you can modify it as you wish...
Provided you understand a little about how it works.
4 - Example
Code: Select all
dta_1721
.asc $01," YOU'RE DEAD !!!",0 ;$1721
.asc "THE NECROMANCER MARCHES ON THE WORLD",0 ;$1734
.asc $03,"GAME OVER",0,$FF ;$1759
In the original game, this text appears in white. As you can see, I added a red ink attribute ($01) before "YOU ARE DEAD" and a yellow ink attribute ($03) before "GAME OVER". I thought these two extra bytes wouldn't cause a crash, since the final characters "$0" and "$0,$FF" are usually used to indicate the end of a sentence and paragraph.
The game crashed!
I hadn't considered that before being displayed on the screen (with the use of $0 and $FF), the text was transferred from $1721 to $4380 using the X register as bytes counter.
Code: Select all
bn_07B7
LDA dta_1721,X ;$07B7 BD 21 17
STA $4380,X ;$07BA 9D 80 43
INX ;$07BD E8
CPX #$43 ;$07BE E0 43
BNE bn_07B7 ;$07C0 D0 F5
After replacing #$41 with #$43 (+2 bytes), everything was OK again with red and yellow color this time .
I hope I've answered the question and ... Sorry for having been a bit (too much?) long .
