Author Topic: Putting Sprites on the Screen?  (Read 431 times)

0 Members and 1 Guest are viewing this topic.

Offline Apidya

  • CPC464
  • **
  • Posts: 3
  • Country: gb
  • Liked: 2
  • Likes Given: 0
Putting Sprites on the Screen?
« on: 16:16, 13 April 21 »
Hello all,


I am learning from Assembler book called "Learn Multiplatform Assembly Programming" that I just bought from Amazon.


I have decide code Z80 Assembler for CPC Emulator because it got Assembler built in :)


I am trying do image of the Bat and I seem get frustration on why I cant draw the Bat Correctly!
For Example...

Code: [Select]
TestSprites:
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000
db %00110000,%00000000


Updated: I made corrections that is 8 lines of db.....not 7 as that was my error on typing here but does anyone how make bat Sprites?




« Last Edit: 19:32, 13 April 21 by Apidya »

Offline SRS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 642
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 642
  • Likes Given: 376
Re: Putting Sprites on the Screen?
« Reply #1 on: 21:50, 13 April 21 »
your Data is just a line of "- - - - - - -" ...
I'd recommend to look how CPC writes to screen (here in wiki) and the good article about sprites here: http://www.cpcmania.com/Docs/Programming/Sprites_I_Introduction_to_using_sprites.htm
And here : http://www.cpcwiki.eu/index.php/Programming:Coding_a_simple_BASIC_game_into_Assembly
« Last Edit: 21:54, 13 April 21 by SRS »

Offline Apidya

  • CPC464
  • **
  • Posts: 3
  • Country: gb
  • Liked: 2
  • Likes Given: 0
Re: Putting Sprites on the Screen?
« Reply #2 on: 23:44, 13 April 21 »
Thanks SRS and I will checked the links :)




Offline keith56

  • ちび悪魔!
  • Supporter
  • 6128 Plus
  • *
  • Posts: 588
  • Country: jp
  • Part Ma, Part Aku... All Chibi!
    • Chibi Akumas Assembly tutorials
  • Liked: 983
  • Likes Given: 212
Re: Putting Sprites on the Screen?
« Reply #3 on: 01:47, 15 April 21 »
Hi there!... that book sounds familiar somehow! :-P

The example in the book is based on this one here:
https://www.chibiakumas.com/z80/simplesamples.php

https://www.youtube.com/watch?v=21jaMDKXfZ4

You can download the book sources here (and save yourself some typing)
http://www.chibiakumas.com/book/
I posted your bitmap into the example, and it works fine (attached)

if you post the full source code you're trying to run, I'll see if I can help

« Last Edit: 01:50, 15 April 21 by keith56 »
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!