Screen editor ported to C64

Other Computers and Game Systems

Moderator: Moderators

Post Reply
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Screen editor ported to C64

Post by adric22 »

I ported my screen editor over to the C64, which is cool because now you can edit in 80x50 pixels. Anyway, one problem I can't seem to work out is that the load/save routines don't work anymore. I didn't change anything except the length of the file to be saved (since the screen is now larger). Saving doesn't seem to save anything and loading causes the system to reset to a READY prompt.. I haven't been able to figure out why. Otherwise, everything else is working. Here are the load/save routines if anyone has any input:

Code: Select all

FILENAME	!pet "image"
SETLFS = $FFBA
SETNAM = $FFBD
LOAD = $FFD5
SAVE = $FFD8

LOADFILE 	; Uses kernel routine to load temporary screen area from disk.
	LDA	#$01
	LDX	#$08		; Device 8
	LDY	#$01
	JSR	SETLFS
	LDA	#$05
	LDX	#<FILENAME
	LDY	#>FILENAME
	JSR	SETNAM
	LDA	#$0
	JSR	LOAD
	JSR	LOADSCN	; Copy temporary area to screen memory.
	RTS

SAVEFILE	; Uses kernel routine to save temporary screen area to disk.
	JSR	PUTOLD 	; Gets the cursor off out of the image before saving.
	JSR	COPYSCN	; Copy screen to temporary area.	
	LDA	#$01
	LDX	#$08		; Device 8
	LDY	#$00
	JSR	SETLFS
	LDA	#$05
	LDX	#<FILENAME
	LDY	#>FILENAME
	JSR	SETNAM
	LDA	#<SCRTEM	; Temporary area.
	STA	$C1
	LDA	#>SCRTEM	; Temporary area.
	STA	$C2
	LDA	#$C1
	LDX	#<SCRTEM+$05DC ;end of Temporary area.
	LDY	#>SCRTEM+$05DC ;end of Temporary area.
	JSR	SAVE
	RTS
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Why was this topic locked? Because it's not about the vic-20?
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Bacon
for breakfast
Posts: 578
Joined: Mon Apr 19, 2004 8:07 am

Post by Bacon »

Locking it seems overkill but it should probably be moved to Other Systems.
Bacon
-------------------------------------------------------
Das rubbernecken Sichtseeren keepen das cotton-pickenen Hands in die Pockets muss; relaxen und watschen die Blinkenlichten.
User avatar
orion70
VICtalian
Posts: 4341
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Done :D .
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

I think it got locked in the first place because there already was an ongoing thread about the VIC version and it seemed unneccesary to start a new thread - on Denial no less - just to announce a C64 version.
Anders Carlsson

Image Image Image Image Image
Post Reply