Retro Coding Frenzy

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
User avatar
Snakey
Baaaaaaa!
Baaaaaaa!
Posts: 8938
Joined: Thu May 09, 2002 4:17 pm 0
Location: Hell on Earth

Post by Snakey »

Muttley tells me you can save mem out with the winvice monitor, apparently. I never tried myself, but it should be in the readme ?
Nothing is worth the effort you put into it.
User avatar
Partz
Baaaaa!
Baaaaa!
Posts: 1511
Joined: Tue Apr 23, 2002 8:46 pm 0
Location: Chippenham, Wiltshire

Post by Partz »

ahhhh i have winvice on this pc but have always preferred ccs64 as it was the first emulator i had used....I'll have a look. I know the expert monitor let you save mem but that would obviously save it in some d64/t64 format :?
User avatar
TMR
Baaa!
Baaa!
Posts: 311
Joined: Thu Jan 01, 2004 4:44 pm 0
Location: Leeds, UK
Contact:

Post by TMR »

WinVICE can save yeah, saving from the Expert monitor'll write to a D64 and it's possible to get the PRG files out of there with tools like StarCommander - http://www.sta.c64.org

i really need to keep up more with the emus, still a couple of revisions behind with WinVICE so i missed the Expert being added!
http://www.Oldschool-Gaming.com - 8bit reviews and resources
http://www.Cosine.org.uk - 8bit games, demos and tools
http://www.Cosine.org.uk/TMR - slightly scary stuff...!
User avatar
Snakey
Baaaaaaa!
Baaaaaaa!
Posts: 8938
Joined: Thu May 09, 2002 4:17 pm 0
Location: Hell on Earth

Post by Snakey »

Heh.. well, I didn't even notice it was there. Didn't really expect to find the software for it, without which its useless anyway, so...
Nothing is worth the effort you put into it.
User avatar
Muttley
Sheepie Whore
Sheepie Whore
Posts: 13169
Joined: Thu Apr 25, 2002 12:30 pm 0
XBL Gamertag: Mu77ley
Location: In a maze of twisty passages, all alike.
Contact:

Post by Muttley »

Partz wrote:Hmmm is there anyway of grabbing a chunk of mem in a c64 emu and saving it as a binary for inclusion via c64asm etc?...

Its all well and good coding the c64 again but it feels so sparce without graphics.
As Snakey says, you can do it from VICE in the monitor, can't remember the command offhand, but it's in the docs.

I use the windows based c64 sprite and char editor from here: http://www.coder.pwp.blueyonder.co.uk/

There's also a labelling disassembler there too.

Muttley
Muttley's Blog: Rarely updated, occasionally interesting… maybe
RetroRemakes Framework: Open Source BlitzMax Game Framework
MuttMod: My Open Source BlitzMax Modules
User avatar
moobaa
Sheepie Whore
Sheepie Whore
Posts: 16118
Joined: Sun Sep 29, 2002 8:08 am 0
XBL Gamertag: petee moobaa
PSN: moobaa
Location: Sydney, Australia

Post by moobaa »

Muttley wrote:I use the windows based c64 sprite and char editor from here: http://www.coder.pwp.blueyonder.co.uk/
Oooh, there's llovely... 8O :D :)
User avatar
arron
Baaaaaaa!
Baaaaaaa!
Posts: 7047
Joined: Mon Apr 22, 2002 11:42 pm 0
Location: Here and Now

Post by arron »

I keep meaning to learn how to program old stuff that I didn't program before, but If I did that then I wouldn't have time to program new stuff. It's a real challenge to find time to write any code when things are busy at work..War on Terrorism my arse.. :evil:
"Observation is the path to understanding. Self-observation is the path to self-understanding."
User avatar
sack
Baaaaaaa!
Baaaaaaa!
Posts: 7077
Joined: Fri May 10, 2002 4:13 pm 0
XBL Gamertag: evilgopher
PSN: sixFiveOhTwo
Location: Rijswijk, The Netherlands
Contact:

Post by sack »

TMR just pointed this out to me:


http://www.pocketretro.com/c64cgc2004/

The emphasis is on humour here, so it might be a good way to get some of those retro urges out of the system, be a bit silly if you're a ninja coder or to whore first projects if you just got inspired for the first time.

I'm having a bash anyways :)
User avatar
moobaa
Sheepie Whore
Sheepie Whore
Posts: 16118
Joined: Sun Sep 29, 2002 8:08 am 0
XBL Gamertag: petee moobaa
PSN: moobaa
Location: Sydney, Australia

Post by moobaa »

sack wrote:http://www.pocketretro.com/c64cgc2004/

The emphasis is on humour here, so it might be a good way to get some of those retro urges out of the system, be a bit silly if you're a ninja coder or to whore first projects if you just got inspired for the first time.
Ooooh - Hyper Plasma Race 2309 looks great :D
User avatar
Partz
Baaaaa!
Baaaaa!
Posts: 1511
Joined: Tue Apr 23, 2002 8:46 pm 0
Location: Chippenham, Wiltshire

Post by Partz »

Nice - i was wondering if there was a sprite editor for the c64 - was in work thinking about knocking one up in C#.

So - i got some sprites and had a little thumble around - thanks to snakey and muttley for the mem grab bits. I used the monitor in winvice in the end but c64asm would not let me load in binary files unless they were in d64 format - so i wrote a little C file to output the file in hex with the .byte header. No music in this one but i did fiddle with sid a bit :)
User avatar
andym00
Baaaa!
Baaaa!
Posts: 967
Joined: Sun Nov 02, 2003 10:05 pm 0
Location: A Viennese cow field..

Post by andym00 »

sack wrote:TMR just pointed this out to me:

http://www.pocketretro.com/c64cgc2004/

The emphasis is on humour here, so it might be a good way to get some of those retro urges out of the system, be a bit silly if you're a ninja coder or to whore first projects if you just got inspired for the first time.

I'm having a bash anyways :)
lol - I'll definately knock something up for that..
Grand Master Turing once dreamed that he was a machine. When he awoke he exclaimed:
"I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!''
User avatar
Muttley
Sheepie Whore
Sheepie Whore
Posts: 13169
Joined: Thu Apr 25, 2002 12:30 pm 0
XBL Gamertag: Mu77ley
Location: In a maze of twisty passages, all alike.
Contact:

Post by Muttley »

Partz wrote:Nice - i was wondering if there was a sprite editor for the c64 - was in work thinking about knocking one up in C#.

So - i got some sprites and had a little thumble around - thanks to snakey and muttley for the mem grab bits. I used the monitor in winvice in the end but c64asm would not let me load in binary files unless they were in d64 format - so i wrote a little C file to output the file in hex with the .byte header. No music in this one but i did fiddle with sid a bit :)
That's cool! :)

With DASM you can just specify a memory location in your code and INCLUDE a binary file. Never used c64asm so don't know if it's possible with that.

Muttley
Muttley's Blog: Rarely updated, occasionally interesting… maybe
RetroRemakes Framework: Open Source BlitzMax Game Framework
MuttMod: My Open Source BlitzMax Modules
User avatar
Partz
Baaaaa!
Baaaaa!
Posts: 1511
Joined: Tue Apr 23, 2002 8:46 pm 0
Location: Chippenham, Wiltshire

Post by Partz »

Need to use something better than notepad to edit the code though - will bring my codewright disks up from my parents on the bank holiday weekend so i can do some proper layout.

I still dont understand how to make a raster bar glitch free - was getting there by positioning a sprite just off the edge of screen etc but i only get 8 decent lines then it buggers up again - even if i do a different wait for those bad lines?? - I gave up!.

Certainly gonna have a play with the char editor though and see if i can get some level type stuff scrolling around.

I find the simplest things difficult in 6510... when i used the expert to code the original 64 i would modify the upper byte of an address loaded into the accumulator to make big loops... with the assembler i dont see a way to do this other than use multiple loops of 255 in length cos it would be a pain in the ass working out the address the code was going to be at.
User avatar
Muttley
Sheepie Whore
Sheepie Whore
Posts: 13169
Joined: Thu Apr 25, 2002 12:30 pm 0
XBL Gamertag: Mu77ley
Location: In a maze of twisty passages, all alike.
Contact:

Post by Muttley »

Partz wrote:Need to use something better than notepad to edit the code though - will bring my codewright disks up from my parents on the bank holiday weekend so i can do some proper layout.

I still dont understand how to make a raster bar glitch free - was getting there by positioning a sprite just off the edge of screen etc but i only get 8 decent lines then it buggers up again - even if i do a different wait for those bad lines?? - I gave up!.

Certainly gonna have a play with the char editor though and see if i can get some level type stuff scrolling around.

I find the simplest things difficult in 6510... when i used the expert to code the original 64 i would modify the upper byte of an address loaded into the accumulator to make big loops... with the assembler i dont see a way to do this other than use multiple loops of 255 in length cos it would be a pain in the ass working out the address the code was going to be at.
Glitch free rasters are a pain. I use individual delay loops for each line (some raster lines have more cpu cycles available than others). Like this:

Code: Select all

irq1:	pha		;save the registers
	txa
	pha
	tya
	pha
	ldx bar1rollcount
	ldy #6		;slight delay before 1st bar
delayloop0:	dey
	bpl delayloop0
	lda bar1colours,x
	sta $d021
	ldy #2
delayloop1:	dey
	bpl delayloop1
	lda bar1colours+1,x
	sta $d021
	ldy #7
delayloop2:	dey
	bpl delayloop2
	lda bar1colours+2,x
	sta $d021
	ldy #10
delayloop3:	dey
	bpl delayloop3
	lda bar1colours+3,x
	sta $d021
	ldy #10
delayloop4:	dey
	bpl delayloop4	
	lda bar1colours+4,x
	sta $d021
	ldy #10
delayloop5:	dey
	bpl delayloop5
	lda bar1colours+5,x
	sta $d021
	ldy #10
delayloop6:	dey
	bpl delayloop6
	lda bar1colours+6,x
	sta $d021
	ldy #10
delayloop7:	dey
	bpl delayloop7
	lda bar1colours+7,x
	sta $d021
	ldy #9
delayloop8:	dey
	bpl delayloop8
	lda #$00
	sta $d021
	
	dec bar1rolldelay
	bne bar1skiproll
	lda #4
	sta bar1rolldelay
	inc bar1rollcount
	lda bar1rollcount
	cmp #8
	bne bar1skiproll
	lda #$00
	sta bar1rollcount
bar1skiproll:	lda #LINE2
	sta $d012
	lda #<irq2
	sta $fffe
	lda #>irq2
	sta $ffff
	lda #$01		;clear raster interrupts
	sta $d019
	lda $dc0d		;clear CIA interrupts
	pla		;restore registers
	tay
	pla
	tax
	pla
	rti		

bar1colours:	dc.b 6,14,3,1,3,14,6,0
	dc.b 6,14,3,1,3,14,6,0
	
bar1rolldelay:	dc.b 4
bar1rollcount:	dc.b 0
Muttley
Muttley's Blog: Rarely updated, occasionally interesting… maybe
RetroRemakes Framework: Open Source BlitzMax Game Framework
MuttMod: My Open Source BlitzMax Modules
User avatar
TMR
Baaa!
Baaa!
Posts: 311
Joined: Thu Jan 01, 2004 4:44 pm 0
Location: Leeds, UK
Contact:

Post by TMR »

Partz wrote:So - i got some sprites and had a little thumble around - thanks to snakey and muttley for the mem grab bits. I used the monitor in winvice in the end but c64asm would not let me load in binary files unless they were in d64 format
That's a quirk of that sprite editor, it doesn't save PRG files out and that's all C64Asm can deal with; all y'need to do is add a low/high byte format load address at the start of the file and C64Asm can include it.
http://www.Oldschool-Gaming.com - 8bit reviews and resources
http://www.Cosine.org.uk - 8bit games, demos and tools
http://www.Cosine.org.uk/TMR - slightly scary stuff...!
Post Reply