Jump to content

Photo

Bitmap kernel


55 replies to this topic

#26 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • Topic Starter
  • 5,455 posts
  • Location:Georgia, USA

Posted Tue Aug 18, 2009 6:48 PM

Two can play this "mystery guy" game. Hint: If you do *not* know who this is, you are hereby banished from these forums!

Michael

Attached Files



#27 Wickeycolumbus OFFLINE  

Wickeycolumbus

    River Patroller

  • 4,742 posts
  • Location:Michigan

Posted Tue Aug 18, 2009 6:50 PM

:D Nolan Bushnell!

#28 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 24,983 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Aug 18, 2009 7:12 PM

:D Nolan Bushnell!

That's not Nolan Bushnell. That's Chuck E. Cheese.

#29 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,495 posts
  • begin 644 contest

Posted Tue Aug 18, 2009 7:42 PM

Any chance it can display RAM?

Absolutely! However, a 96x192 image takes 2304 bytes, or 2.25K. I think the only existing bankswitching method that could handle it is 4A50. But the Harmony/Melody cart might be able to handle it, too, although it might require a new bankswitching scheme (unless it can emulate a stripped-down version of 4A50 bankswitching).

If you change the bitmap to 96x96 (2 lines per pixel), you'd need only 1152 bytes, or 1.125K, which might be doable with E7 bankswitching, although the kernel would need to be revised a bit.

Or you could keep the pixels at 1 line per pixel, and change the width and/or height of the bitmap.

1024 bytes (1K) is exactly enough for a 64x128 image-- 8 player columns across, or a little bit wider than a standard 6-digit score display, and 2/3 the height of the screen.

1024 bytes is also enough for an 80x102 image-- 10 player columns across.

Michael

Traditional bankswitching can't directly address 2.25k, but Supercharger can handle this easily.

The 4A50 just allows reading and writing to the same logical address in fewer cycles using a method called "magic writes."

Harmony/Melody lacks the bus hold circuitry to do magic writes but it may be able to do something close if one wishes to write with the 6507. If you want to write (which could involve a host of graphics functions) using the microcontroler, the Melody/Harmony could outperform 4A50 for this functionality.

Edited by batari, Tue Aug 18, 2009 7:47 PM.


#30 SeaGtGruff OFFLINE  

SeaGtGruff

    Quadrunner

  • Topic Starter
  • 5,455 posts
  • Location:Georgia, USA

Posted Tue Aug 18, 2009 8:54 PM

That's Chuck E. Cheese.

Well, he's certainly hairy enough to be Chuck E. Cheese! :)

Michael

#31 thegoldenband OFFLINE  

thegoldenband

    River Patroller

  • 3,993 posts
  • Location:Long Island, NY

Posted Tue Aug 18, 2009 9:46 PM

I'm trying to compile the .bas files in this thread, but every one I've tried has thrown a "Fatal assembly error: Check command line format" when it reaches DASM. Since my own, preexisting bB files are still compiling fine, and no one else in the thread has raised a red flag, I'm wondering if I'm out of date. Have there been any recent changes to bB, or to DASM, that are required by this kernel? I haven't updated my copy of either one in (ahem) close to two years.

#32 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Tue Aug 18, 2009 10:03 PM

In case anybody else wants to join in the fun, here is a copy of the utility RT has been testing for me. I am going to integrate this into visual bB, but if anybody wants to test it by itself you can give it a try.

Attached File  ImgToCode.zip   43.44KB   150 downloads

It's written to the .NET Framework 2.0 so if you're not running XP, Vista, or Win7 you *might* need to install it from here. If you're already using Hack-o-matic 3 or Visual bB then you already have this installed and working.

-Jeff

#33 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 871 posts
  • Location:MO, USA

Posted Wed Aug 19, 2009 9:34 AM

Thanks jwierer. Is there any way to set your imgtocode program to not automatically analyze a loaded image, or a way to stop the process?

#34 katchow OFFLINE  

katchow

    Space Invader

  • 20 posts
  • Location:Dayton, OH

Posted Wed Aug 19, 2009 10:27 AM

wowee wow! I know what'll I'll be playing w/ when I get home.

#35 Dan Iacovelli OFFLINE  

Dan Iacovelli

    Quadrunner

  • 5,469 posts
  • Location:westchester,IL

Posted Wed Aug 19, 2009 12:04 PM

the second mystery guy is Nolan "Pong" Bushnell
former head of atari, and in weird Al worlds " the reason Atari Age was invented "

#36 Dan Iacovelli OFFLINE  

Dan Iacovelli

    Quadrunner

  • 5,469 posts
  • Location:westchester,IL

Posted Wed Aug 19, 2009 1:40 PM

exactly what does the size have to be for images.
I tried to get to get to work and the images in the bin file crashes.(I convert to Bbasic,)
maybe when Iget more time I'll work with other pics.

#37 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 24,983 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Aug 19, 2009 2:25 PM

exactly what does the size have to be for images.
I tried to get to get to work and the images in the bin file crashes.(I convert to Bbasic,)
maybe when Iget more time I'll work with other pics.

For the Bitmap kernel, it needs to be 96 x 192, but the for the .bas code, it needs to be 32 x 32 since that's a totally different thing.

#38 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Wed Aug 19, 2009 8:01 PM

Thanks jwierer. Is there any way to set your imgtocode program to not automatically analyze a loaded image, or a way to stop the process?

Yes that is an easy change for me to make. You want to be in control of when code is actually generated correct?

#39 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Wed Aug 19, 2009 8:04 PM

<!--quoteo(post=1819634:date=Wed Aug 19, 2009 2:40 PM:name=Dan Iacovelli)--><div class='quotetop'>QUOTE (Dan Iacovelli @ Wed Aug 19, 2009 2:40 PM) <a href="index.php?act=findpost&pid=1819634"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->exactly what does the size have to be for images.
I tried to get to get to work and the images in the bin file crashes.(I convert to Bbasic,)
maybe when Iget more time I'll work with other pics.<!--QuoteEnd--></div><!--QuoteEEnd-->
For the Bitmap kernel, it needs to be 96 x 192, but the for the .bas code, it needs to be 32 x 32 since that's a totally different thing.

The other thing to consider is number of frames. The code it outputs won't move around banks so you could produce more data than can fit in a bank.

-Jeff

#40 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Fri Aug 21, 2009 2:41 PM

Thanks jwierer. Is there any way to set your imgtocode program to not automatically analyze a loaded image, or a way to stop the process?

Here's an update. In general this should decode animated gifs faster, especially on modern computers with multiple cores.
Attached File  ImgtoCode.zip   44.84KB   114 downloads
-Jeff

#41 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 871 posts
  • Location:MO, USA

Posted Sun Aug 23, 2009 4:00 PM

Here's an update. In general this should decode animated gifs faster, especially on modern computers with multiple cores.
-Jeff


This version closes when I click from playfield to sprite.

Here is a 3d fuji i made with it:
Attached File  fuji3d.bin   8KB   170 downloads

Edited by MausGames, Sun Aug 23, 2009 9:01 PM.


#42 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Sun Aug 23, 2009 9:21 PM


Here's an update. In general this should decode animated gifs faster, especially on modern computers with multiple cores.
-Jeff


This version closes when I click from playfield to sprite.

Here is a 3d fuji i made with it:
Attached File  fuji3d.bin   8KB   170 downloads

Closes? I would say crashes horribly! Sorry about that. This one should work and should be faster for black and white rendered images.
Attached File  ImgtoCode.zip   45.47KB   133 downloads
-Jeff

Edited by jwierer, Sun Aug 23, 2009 9:34 PM.


#43 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Thu Aug 27, 2009 8:28 AM

This one fixes a few other bugs I found. I also tried to speed it up a bit more. Animated GIFs that are sized to be 32x32 should be pretty quick to render now.
Attached File  ImgtoCode.zip   35.77KB   144 downloads
-Jeff

#44 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 24,983 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Aug 27, 2009 8:44 AM

This one fixes a few other bugs I found. I also tried to speed it up a bit more. Animated GIFs that are sized to be 32x32 should be pretty quick to render now.

Thanks.

#45 thegoldenband OFFLINE  

thegoldenband

    River Patroller

  • 3,993 posts
  • Location:Long Island, NY

Posted Thu Aug 27, 2009 5:15 PM

I'm still not able to get any of the examples posted in this thread to compile. Any suggestions?

#46 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Sat Aug 29, 2009 11:21 PM

I'm still not able to get any of the examples posted in this thread to compile. Any suggestions?

It's possible you need one of the various updates that have come out over time. I think there is a roll up of different updates here.

-Jeff

#47 rpgfaker OFFLINE  

rpgfaker

    Moonsweeper

  • 489 posts
  • Location:The Plague in Siena

Posted Sun Aug 30, 2009 8:38 AM

Wow oh wow! Wow Micheal this is truely amazing thanks for sharing this! It's just like the GameBoy Camera! I was playing Asteroids Arcade(2600) last night and then fiddled with this..so here's Asteroids titlescreen.

Attached Thumbnails

  • screenshot_0.png

Attached Images

  • asteroids_game.jpg

Attached Files



#48 thegoldenband OFFLINE  

thegoldenband

    River Patroller

  • 3,993 posts
  • Location:Long Island, NY

Posted Mon Aug 31, 2009 12:56 PM

It's possible you need one of the various updates that have come out over time. I think there is a roll up of different updates here.

Thanks so much, that's exactly what I was looking for. I'll give it a whirl.

#49 thegoldenband OFFLINE  

thegoldenband

    River Patroller

  • 3,993 posts
  • Location:Long Island, NY

Posted Mon Aug 31, 2009 3:54 PM

It turned out that the problem was something else, namely that the .bas files I was trying to compile weren't in the same directory as bB. In fact, I can't even have them in a subfolder inside the bB folder -- for reasons I don't understand, they absolutely have to be on the top level, or else compilation fails. At least I got it to work!

I'd like to add music to my bitmap display:

Attached File  bennu01.bas.bin   4KB   104 downloads

But it seems as if any additional code would need to be in a separate bank. SeaGtGruff warned that bankswitching wasn't working yet, and indeed, the 8K ROM option messes up the display. I tried forcing all the existing code into one bank or the other, but it didn't seem to work, since the compiler forces the graphics into the last bank. Is there a way to override that?

I'm also not 100% sure how I should return to the display code. Should I wrap the whole thing in a routine name, or is there already one that I'm overlooking?

EDIT: Also, how many variables are available with this code? I don't really understand what I'm seeing, but it looks like all but one of them are tied up...?

Edited by thegoldenband, Mon Aug 31, 2009 4:39 PM.


#50 jwierer OFFLINE  

jwierer

    Dragonstomper

  • 890 posts
  • Location:Seattle,WA

Posted Mon Aug 31, 2009 5:02 PM

It turned out that the problem was something else, namely that the .bas files I was trying to compile weren't in the same directory as bB. In fact, I can't even have them in a subfolder inside the bB folder -- for reasons I don't understand, they absolutely have to be on the top level, or else compilation fails. At least I got it to work!

Not to get off-topic, but it sounds like your environment variables are not setup. The bB readme covers how to set these and if you're using VisualbB there is an option to handle this for you. Also directory names with spaces are problematic. I would recommend keeping bB in root directory with no spaces to rule out those issues.

-Jeff

Edited by jwierer, Mon Aug 31, 2009 5:04 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users