Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Assembly and adding a Picture
2009-08-26 19:51
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
Assembly and adding a Picture

Hi All,

I have some assembly code written for ACME assembler. I was just curious how I would add a picture into the code. I got the pause down but I just need a picture to show. Doesn't matter what format. I assume I can change my picture to most formats specified.

This would be great if someone could let me know.

Thanks,
MisterMSK
 
... 21 posts hidden. Click here to view all posts....
 
2009-11-03 19:58
NecroPolo

Registered: Jun 2009
Posts: 231
Another coding über-noob here. This thread is a great help, all the essential hints and pieces of knowledge, explanations are here.

Although I have passed the part of understanding the way it works recently and hopefully I will be able to make my first simple one-file demo soon - I still appreciate the helpful attitude.

Respect for that, for all of you. That is the way the things should be.

NP
2009-11-11 18:15
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
Quote: or do it the other way round - align the code to the gfx.
This way you save quite some memory to be overwritten:

*=$5c00

hirescolmap
.bin 8002,1000,"gfxfun/rooms2.ip64h"
.dsb 24,0
hiresbitmap
.bin 2,8000,"gfxfun/rooms2.ip64h"

code_start
	
init_gfx
	sei
	lda #$06
	sta $d020
	lda #%00000010
	sta $dd00
	lda $d011
	ora #%00111000	;enable hires + screen on
	sta $d011	
	lda #%01111000  
	sta  $d018


PS: ip64h is interpaint HiRes - gimp with cbmplugs is able to export to this format ;-)
PPS: you could also put the code inside the 24 byte gap between bitmap and colormap but well....


Just what everyone else said x 1000. Thanks a lot to all. Just a quick question. I tried converting the quoted text acme but I don't know what .dsb is in Acme. Anyone know off the top of there head?
2009-11-11 18:21
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
Also, where do you get the cbm plugin for Gimp? I tried the CBM Plugin Registry with no luck.
2009-11-11 21:25
enthusi

Registered: May 2004
Posts: 675
http://packages.debian.org/source/lenny/cbmplugs

and .dsb 24,0
means 24 bytes of value 0.
In this case to fill up the gap between 40x25 and 2^10.

Cheers,
enthusi
2009-11-12 02:21
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
Wow! Thanks!
2010-02-11 22:11
Aeko
Account closed

Registered: Nov 2008
Posts: 1
Strager: PERFECT !

I've reading and trying several routines for displaying koala images (exported from Proyect One) and this the one that have worked like a charm to me. The explanation is also very clear.

Thanks, thanks a lot.
2010-02-13 09:03
Martin Piper

Registered: Nov 2007
Posts: 634
I remember back in the day working out how to do this without any documentation on the file format.
The bitmap portion of the file is 40*25*8 bytes, the colour information is another 40*25*2 bytes. The trick was to use the editor to change one thing, save the file, compare the binary difference. Rinse and repeat until it is understood where the different data is.
2010-02-14 12:29
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Or you can rip the code from Koala Painter :D
2010-02-19 04:08
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
@Stranger

You are great. That works. I can't believe it. I got one final problem. After displaying an image I want to go back to a BASIC TEXT Video mode. I removed the last JMP and I inserted a 3 second pause. I change to the charater set to 21, as well as 23, but I still get the below image. How do you transfer back?



Thanks for All the Help,
MisterMsk
2010-02-19 04:42
MisterMSK
Account closed

Registered: Jul 2009
Posts: 37
Got it. Thanks for all the help.

    lda #%00011111
    sta $d011
Previous - 1 | 2 | 3 | 4 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
A3/AFL
Guests online: 132
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.4)
2 Magic  (9.4)
3 hedning  (9.2)
4 Newscopy  (9.1)
5 Elwix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.039 sec.