| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Release id #5937 : Megademo 1
Another demo which simply doesn't work. I assume that the image is ok but the loader simply fucks up everywhere, does anyone know a setup where it is working on? I tried emulator + all drive settings, C128DCR and C64C + 1541-II.
(Another example of a demo which nobody knows because it works nowhere...) |
|
| |
Copyfault
Registered: Dec 2001 Posts: 474 |
Accidently I checked this demo some days ago... setting was also a C64C + 1541 II. At least the parts on the first side seemed to be ok; after diskswapping the loader gave up... Now if my brain wasn't so lousy, I could tell if it worked allright back in the 90's... but I don't think so!
CF |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
For me it didn't even boot the intro. The loader passes some very complicated routines which reminded me of a copy protection and then simply gave up reading track 17. I suspect that the loader has a hardcoded sector header ID.
BAH! Another coder who shouldn't have started drive coding at all. |
| |
Copyfault
Registered: Dec 2001 Posts: 474 |
I'm really not sure if this demo worked back then... I assumed that the second side of my copy is just crap. I got the disk somewhen in the nineties...
Can I be of any help with an image of the 1st side of the copy I have here? Guess not, though...
CF |
| |
Copyfault
Registered: Dec 2001 Posts: 474 |
I'm not in drivecoding at all, so I've got to ask: what does "hardcoded sector id" mean? Is it possible to copy it? A usual D64-image does not seem to carry this information...
Checked the demo again: semmingly the 2nd side has exactly the same problem Vice has when booting the demo. Is it necessary to recode the loader (which nobody will do anyway;)) in order to make this demo d64-image-compatible?
At least the makers of this demo gave out a (hidden) warning in the notefile, where they say the loader is made up of different routines, including some from EPYX...
CF |
| |
A3
Registered: Dec 2005 Posts: 362 |
Found this demo in 3 different collections all supposedly the 100% version. Non of them are working though in emulation mode. Thinking back, I'm now quite convinced that the demo never worked for me at all even on the c64. |
| |
tlr
Registered: Sep 2003 Posts: 1787 |
Quoting copyfaultI'm not in drivecoding at all, so I've got to ask: what does "hardcoded sector id" mean? Is it possible to copy it? A usual D64-image does not seem to carry this information...
Checked the demo again: semmingly the 2nd side has exactly the same problem Vice has when booting the demo. Is it necessary to recode the loader (which nobody will do anyway;)) in order to make this demo d64-image-compatible?
The G64-format can contain this (supported by CCS64 & VICE atleast).
http://www.unusedino.de/ec64/technical/formats/g64.html
BTW, Shouldn't a 1541 emulation of a d64 just set the sector-id to the id present in the BAM?
In that case, I don't see why it should not work unless someone has later changed the BAM id of the disk.
The coder of the demo would be quite naive to assume that you'd use a nibbler to copy his demo. ;)
|
| |
hollowman
Registered: Dec 2001 Posts: 474 |
The version that I first found on the net back in 97 (or something) never worked, and i've felt ashamed ever since, because i uploaded it to antidote without checking it first.
Some time ago Iopop gave me what i believe is a fully working version, which I've uploaded to csdb now.
Perhaps Iopop can tell about all the hassle it was to get a working version transferred to pc =) |
| |
The Phantom
Registered: Jan 2004 Posts: 360 |
Hmmm. THe only problems i've had viewing this demo is the ridiculous loading (like there are 2 load phases between each part).
When the intro "looks" finished, hit yer space bar.
On the next (ahem) part, there were no visuals for me, just music. So I hit space and it loaded the next part.
I'm currently on side 2, looking at some "rescue the fractals" part now.
Am I looking at the working version here?
I'm using Vice 1.19, true drive emulation on and PAL for my video. No cart attached and no other "special" features. Seems to be working fine for me. |
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Quote:BTW, Shouldn't a 1541 emulation of a d64 just set the sector-id to the id present in the BAM?
In that case, I don't see why it should not work unless someone has later changed the BAM id of the disk.
Well, often a demo has it's directory styled after the demo is finished, that also includes changing the disk header + ID. Also, some cartridges have a hardcoded sector header ID in their fast-format routines and don't care for the ID in the directory.
Quote:The coder of the demo would be quite naive to assume that you'd use a nibbler to copy his demo. ;)
Many loaders have such a hardcoded ID, but in many cases it's enough to assume sector header ID = disk ID. An example is "Follow the Sign 3" by Byterapers.
|
| |
Graham Account closed
Registered: Dec 2002 Posts: 990 |
Oh and concerning the sector header ID problem: What do you guys think about a small extension to the D64 format? Adding 2 bytes to a D64 would allow it to have all possible D64 incarnations with or without sector header ID information and still have a 100% detection what kind of D64 it actually is. |
| |
tlr
Registered: Sep 2003 Posts: 1787 |
@Graham:
I assume that a disk relying on the disk id being different from the sector id won't survive though many normal/non-nibbler disk copiers on the 64 either. (correct me if I'm wrong here.)
In that case the disk could essentially be considered copy-protected, so it wouldn't be too far fetched to make it a .g64 instead.
How many of these non-intentionally copy-protected releases are there anyway?
|
| |
The Human Code Machine
Registered: Sep 2005 Posts: 112 |
The loader doesn't do any bad tricks or any other nasty checks, copy protections etc. The loader also doesn't use any hardcoded secotr header ID. It's a simple GI Joe loader improved by MWS/Radwar and myself. The diskside will be checked using a simple file on each side. I think you all got bad transfers of the demo or an unauthorized prerelease. I checked the demo in 1997 on many different setups without any problems! |
| |
Acidchild
Registered: Jan 2002 Posts: 474 |
i had problems to transfer this demo back then myself, i think it was a matter of the header and id, which must be the same as on the original disk and wasn't after transfering/copying. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:The loader also doesn't use any hardcoded secotr header ID
it definately depends on it, i just tried. take the d64, load it - works. now change the disk id to zeros and try again - doesnt even run the intro anymore. |
| |
The Human Code Machine
Registered: Sep 2005 Posts: 112 |
I must be either blind or I'm doing something wrong. Attached the loader source used in the demo. The Searchfilename subroutine could be the problem, but I can't find anything unusual there.
PROCESSOR 6502
ORG $9000
;ZEROPAGE ADRESSEN
VARBASE EQU $E0
ENDFLAG EQU VARBASE+$0
ZP2 EQU VARBASE+$1
ZP3 EQU VARBASE+$2
ZP4 EQU VARBASE+$3
ZP5 EQU VARBASE+$4
ZP6 EQU VARBASE+$5
ZP7 EQU VARBASE+$6
ZP8 EQU VARBASE+$7
ZP9 EQU VARBASE+$8
ZPA EQU VARBASE+$9
ZPB EQU VARBASE+$A
BYTE EQU VARBASE+$B
;-------------------------------------
;MEMORYS
STARTUP EQU $0002
;-------------------------------------
;EQUS
;--------------------------------------
;ZEROPAGE FUER SENDCODE
FLOPPYBAL1 EQU $FC
FLOPPYBAH1 EQU $FD
FLOPPYBAL2 EQU $FE
FLOPPYBAH2 EQU $FF
;--------------------------------------
;FLOPPY EQUS
COMMAND EQU $04
TRACK EQU $0E
SECTOR EQU $0F
;--------------------------------------
;NORMALE EQUS
CODE EQU $AA
DESTINATION EQU $130
;--------------------------------------
START SUBROUTINE
SEI
CLD
LDX #$FF
TXS
LDA #$37
STA $01
INX
STX $D011
STX $D418
STX $D020
STX $D021
STX $D015
STX $D030
LDY #$1F
.A LDA $FD30,Y
STA $0314,Y
DEY
BPL .A
LDA #$7E
STA $0314
JSR SEND
SEI
LDX #$2F
TXS
LDA #$35
STA $01
LDA #$97
STA $DD00
LDX #$00
.1 LDA DATA1,X
STA DESTINATION,X
LDA DATA1+$100,X
STA DESTINATION+$100,X
LDA DATA1+$200,X
STA DESTINATION+$200,X
INX
BNE .1
LDA #$00
LDX #"S"
LDY #"0"
JSR FLOAD
JMP STARTUP
;------------------------------------------------------------------------------
SEND SUBROUTINE
LDA #<FLOPPYCODE
STA FLOPPYBAL1
LDA #>FLOPPYCODE
STA FLOPPYBAH1
LDA #<FLOPPYSTART
STA FLOPPYBAL2
LDA #>FLOPPYSTART
STA FLOPPYBAH2
.NEXT JSR INITSEND
LDA #"M"
JSR $FFA8
LDA #"-"
JSR $FFA8
LDA #"W"
JSR $FFA8
LDA FLOPPYBAL2
JSR $FFA8
LDA FLOPPYBAH2
JSR $FFA8
LDA #$20
JSR $FFA8
LDX #$00
LDY #$00
.NEXTBYTE LDA (FLOPPYBAL1),Y
JSR $FFA8
INC FLOPPYBAL1
BNE .OVER1
INC FLOPPYBAH1
.OVER1 INX
CPX #$20
BNE .NEXTBYTE
JSR $FFAE
LDA FLOPPYBAL2
CLC
ADC #$20
STA FLOPPYBAL2
LDA FLOPPYBAH2
ADC #$00
STA FLOPPYBAH2
CMP #$07
BNE .NEXT
STARTCODE SUBROUTINE
JSR INITSEND
LDX #$00
.1 LDA .TEXT1,X
JSR $FFA8
INX
CPX #$05
BNE .1
.EXIT JSR $FFAE
LDA #$C7
STA $DD00
LDY #$00
.2 DEX
BNE .2
DEY
BNE .2
RTS
INITSEND LDA #$08
JSR $FFB1
LDA #$6F
JMP $FF93
.TEXT1 DC.B "M-E",#<FLOPPYSTART,#>FLOPPYSTART
DATA1
RORG DESTINATION
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;1 BUCHSTABE NAME =XREG
;1 BUCHSTABE NAME =YREG
;AKKU
;0= LOAD NORMAL
;1= LOAD DECRUNCH
FLOAD SUBROUTINE
PHA
TYA
PHA
LDA $DD00
AND #$0F
STA ADD001+1
EOR #$10
STA SEND2BIT+1
EOR #$30
STA ADD003+1
EOR #$B0
STA GET+1
EOR #$50
STA FIVE+1
STA ADD006+1
ADD003 LDA #$27
STA $DD00
JSR SYNCRO
TXA
JSR SENDBYTE2
PLA
JSR SENDBYTE2
LOADFLAG JSR SYNCRO
PLA
BNE DECRUNCHALOAD
;----------------------------
NORMAL SUBROUTINE
JSR GETBYTE2
STA WRITE+1
JSR WAIT12
JSR GETBYTE2
STA WRITE+2
JSR WAIT12
LDX #$00
.NEXTBYTE JSR LOADBYTE
BCS ENDLOAD
DEC $01
WRITE STA $FFFF,X
INC $01
INX
BNE .NEXTBYTE
INC WRITE+2
BNE .NEXTBYTE
LOADBYTE SUBROUTINE
JSR GETBYTE2
CMP #CODE
BEQ .CHANGE
CLC
ENDLOAD RTS
.CHANGE JSR GETBYTE2
CMP #$00
BEQ .SETCODE
CMP #$80
BEQ .LOADEND
JSR SYNCRO
JMP LOADBYTE
.SETCODE LDA #CODE
CLC
RTS
.LOADEND INC ENDFLAG
SEC
RTS
;--------------------------------------
DECRUNCHALOAD SUBROUTINE
LDA #$00
STA ENDFLAG
CTRLGET LDX #$04 ;5 CONTROLBYTES LESEN
CTRL1 JSR LOADBYTE
STA ZP7,X
DEX
BPL CTRL1
LDY ENDFLAG
BNE ENDLOAD
DEC $01
JSR DECRUNCH
INC $01
BNE CTRLGET
; PACKER
; SINGLES
DECRUNCH TYA
STY ZP2
STY ZP4
SINGL1 JSR DECOD1
ROL
BNE SINGL2
BCC SEQUE1
SINGL2 ROL ZP4
JSR DECOD1
BCS SINGL1
STA ZP3
JSR SUBS1
; SEQUENCE LAENGE
SEQUE1 TYA
STY ZP5
STY ZP6
SEQUE2 JSR DECOD1
ROL
BEQ SEQUE4
BMI SEQUE3
JSR DECOD1
BCS SEQUE2
SEQUE3 INC ZP2
SEQUE4 ADC #$02
STA ZP3
AND #$FC
BEQ GOON
INC ZP2
GOON LDX #$03
;PARA-NR.
PARA1 JSR DECOD1
ROL ZP2
DEX
BNE PARA1
;PARA-GET
PARA2 LDX ZP2
LDA PACKDAT,X
TAX
BEQ PARA4
PARA3 JSR DECOD1
ROL ZP5
ROL ZP6
DEX
BNE PARA3
PARA4 LDA ZP2
AND #$07
BEQ PARA6
INC ZP5
BNE PARA5
INC ZP6
PARA5 DEC ZP2
BPL PARA2
PARA6 LDA ZP8
ADC ZP5
STA ZP5
LDA ZP9
ADC ZP6
STA ZP6
LDA ZP5
BNE PARA7
DEC ZP6
PARA7 DEC ZP5
INC ZP2
JSR SUBS2
BEQ DECRUNCH
DECOD1 ASL ZP7
BNE DECOD4
CPY ZPA
BNE DECOD2
CPY ZPB
BNE DECOD3
PLA
PLA
RTS
DECOD3 DEC ZPB
DECOD2 DEC ZPA
PHA
INC $01
JSR LOADBYTE
DEC $01
LDY #$00
SEC
ROL
STA ZP7
PLA
DECOD4 RTS
SUBS1 LDA ZPA
SEC
SBC ZP3
STA ZP5
STA ZPA
LDA ZPB
SBC #$00
STA ZP6
SBC ZP4
STA ZPB
SUBS2 LDY ZP3
BEQ SUBS5
LDA ZP8
SEC
SBC ZP3
STA ZP8
BCS SUBS4
SUBS3 DEC ZP9
SUBS4 LDX ZP2
BEQ LOOP2
LOOP1 LDA (ZP5),Y
DEY
STA (ZP8),Y
BNE LOOP1
BEQ SUBS5
LOOP2 STY .YVAL+1
INC $01
JSR LOADBYTE
DEC $01
.YVAL LDY #$00
DEY
STA (ZP8),Y
BNE LOOP2
SUBS5 CPY ZP4
BEQ SUBS6
DEC ZP6
DEC ZP4
BPL SUBS3
SUBS6 RTS
;--------------------------------------
GETBYTE2 SUBROUTINE
GET LDY #$00
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
NOP
FIVE LDY #$00
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY GET+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY FIVE+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY GET+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY FIVE+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY GET+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
NOP
LDY FIVE+1
LDA $DD00
STY $DD00
ASL
ROR BYTE
LDA BYTE
RTS
SENDBYTE2 SUBROUTINE
STA BYTE
LDY #$04
SEND2BIT LDA #$17
LSR BYTE
BCC .1
ORA #$20
.1 STA $DD00
NOP
NOP
NOP
NOP
ADD001 LDA #$07
LSR BYTE
BCC .2
ORA #$20
.2 STA $DD00
DEY
BNE SEND2BIT
RTS
SYNCRO SUBROUTINE
LDY #$06
.1 DEY
BNE .1
.2 LDA $DD00
AND #$40
BEQ .2
ADD006 LDA #$00
STA $DD00
LDY #$05
.3 DEY
BNE .3
WAIT12 RTS
PACKDAT DC.B $03,$01,$01,$01,$01,$00,$01,$01
DC.B $04,$01,$01,$01,$01,$01,$02,$02
DC.B $04,$01,$01,$01,$01,$02,$02,$02
REND
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
FLOPPYCODE
RORG $0500
FLOPPYSTART SUBROUTINE
SEI
CLD
LDY #$08
.4 LDA #$10
STA $1800
.1 DEX
BNE .1
LDA #$00
STA $1800
.2 DEX
BNE .2
DEY
BNE .4
.3 LDA $1800
AND #$05
BNE .3
LDA $1800
AND #$05
BNE .3
START2 SUBROUTINE
LDA #$08
STA $1800
LDA $1C00 ;LED AUS
AND #$F7
STA $1C00
LDA #$36
STA $1C07
CLI
LDA #$01
.1 BIT $1800
BEQ .1
SEI
LDA #$00
STA $1800
JSR GETBYTE ;NAME 1
STA NAME1+1
JSR GETBYTE ;NAME 2
STA NAME2+1
LDA #$08
STA $1800
LDA $1C00 ;LED AN
ORA #$08
STA $1C00
SEARCHFILENAME SUBROUTINE
CLI
JSR $D042 ;BAM LADEN UND DISK F▄R DISK-WECHSEL
SEI
LDY #$01
.NEXTSECTOR LDX #$12
STX TRACK
STY SECTOR
JSR LOADSECTOR
LDY #$00
.NEXT LDA $0702,Y
AND #$83
CMP #$82
BNE .NEXTFILE
LDA $0705,Y
NAME1 CMP #$00
BNE .NEXTFILE
LDA $0706,Y
NAME2 CMP #$00
BEQ .FILEFOUND
.NEXTFILE TYA
CLC
ADC #$20
TAY
BNE .NEXT
LDY $0701
BPL .NEXTSECTOR
.FILEFOUND LDA $0703,Y
STA TRACK
LDA $0704,Y
STA SECTOR
LOADFILE SUBROUTINE
JSR LOADSECTOR
LDA #$00
STA $1800
LDA $0700
BNE .FULLSECTOR
LDY $0701
INY
STY .1+1
LDY #$02
.2 LDX $0700,Y
JSR SBYTE
INY
.1 CPY #$00
BNE .2
EXITOR LDX #CODE
JSR SENDBYTE
LDX #$80
JSR SENDBYTE
JMP START2
.FULLSECTOR LDY #$02
.3 LDX $0700,Y
JSR SBYTE
INY
BNE .3
LDA $0700
STA TRACK
LDA $0701
STA SECTOR
LDX #CODE
JSR SENDBYTE
LDX #$7F
JSR SENDBYTE
; LDA $1C00
; EOR #$08
; STA $1C00
LDA #$08
STA $1800
BNE LOADFILE
LOADSECTOR SUBROUTINE
LDX #$06
CLI
.NEXTTRY LDA #$80
STA COMMAND
.1 LDA COMMAND
BMI .1
CMP #$01
BEQ .NOERROR
DEX
BNE .NEXTTRY
LDA #$C0
STA COMMAND
.2 LDA COMMAND
BMI .2
JMP LOADSECTOR
.NOERROR SEI
; LDA $1C00
; EOR #$08
; STA $1C00
RTS
SBYTE SUBROUTINE
CPX #CODE
BNE SENDBYTE
JSR SENDBYTE
LDX #$00
SENDBYTE SUBROUTINE
STX $14
LDA #$04
LSR $14
LDX #$02
BCC .1
LDX #$00
.1 BIT $1800
BNE .1
STX $1800
LSR $14
LDX #$02
BCC .2
LDX #$00
.2 BIT $1800
BEQ .2
STX $1800
LSR $14
LDX #$02
BCC .3
LDX #$00
.3 BIT $1800
BNE .3
STX $1800
LSR $14
LDX #$02
BCC .4
LDX #$00
.4 BIT $1800
BEQ .4
STX $1800
LSR $14
LDX #$02
BCC .5
LDX #$00
.5 BIT $1800
BNE .5
STX $1800
LSR $14
LDX #$02
BCC .6
LDX #$00
.6 BIT $1800
BEQ .6
STX $1800
LSR $14
LDX #$02
BCC .7
LDX #$00
.7 BIT $1800
BNE .7
STX $1800
LSR $14
LDX #$02
BCC .8
LDX #$00
.8 BIT $1800
BEQ .8
STX $1800
RTS
GETBYTE SUBROUTINE
LDY #$04
.1 LDA #$04
.2 BIT $1800
BEQ .2
LDA $1800
LSR
ROR $14
LDA #$04
.3 BIT $1800
BNE .3
LDA $1800
LSR
ROR $14
DEY
BNE .1
LDA $14
RTS
REND
|