Shop OBEX P1 Docs P2 Docs Learn Events
Software done? PASM Mandelbrot, Monitor/Hex editor, 3D engine, Chip16 Emulator? — Parallax Forums

Software done? PASM Mandelbrot, Monitor/Hex editor, 3D engine, Chip16 Emulator?

overclockedoverclocked Posts: 80
edited 2014-08-17 02:54 in Propeller 1
Hi all!

After using google for a while I though I ask here and see if I found anything?
I'm thinking about writing something new as a learning experience while trying to port Propeller FPGA to Xilinx an also other Altera development boards.
For the record I never owned a Propeller and I'm still trying to get the FPGA-version going.. :-)
Anyone heard of implementation of these?

1) PASM Mandelbrot? Optimized Mandelbrot written in assembler and working real-time zoom? I've seen some SPIN-code examples but not really anything realtime..

2) A monitor/hex editor running on the Propeller. Either Serial-port or combination TV/VGA-output+PS/2 keyboard to be able to list memory contents and also write/change memory

3) 3D engine? I've seen a movie of polygon hat spinning and also some movies of wireframe hat. Is the source for these open? Anyone know if those are written in SPIN or assembler?

4) I've seen at least one Chip8 emulator so anyone seen any Chip16 emulators? This platform is not as well known but I've done some work with the platform (C# emulator and some Chip16 binaries) so probably a nice hack.

5) Any Propeller BrainFu**?

Anything else that somebody is missing in the realm of Graphics/VM's?

Comments

  • mklrobomklrobo Posts: 420
    edited 2014-08-13 14:10
    I have no idea, but it sounds cool!:cool: I will have a good time looking those up!
    I know Heater can help you...............
  • ElectrodudeElectrodude Posts: 1,658
    edited 2014-08-13 14:29
    I wrote a multi-cog PASM fixed-point mandelbrot renderer I'll post when I'm on my computer with my propeller stuff, but there are barely any comments in the code and it's fairly unreadable due to optimizations. It progressively redraws the screen zoomed in more each time, but it's not what you'd call a real-time zoomer. I can also post my mediocre spin 3d wrapper for Chip Gracey's graphics.spin as well as my spin BF interpreter.

    You should get a real propeller, even if you do use the FPGA version.
  • AribaAriba Posts: 2,690
    edited 2014-08-13 15:54
    We had a Monitor and PASM-Mandelbrot for the Prop 2 FPGA image. But that should not hold you back to do it for the Prop 1.

    What I've missed several times is a viewer for the compressed image formats, mainly PNG, JPG and GIF. If you have the skills to do a fast code that can make an uncompressed image from one of the above formats that would be a great project.

    Andy
  • PublisonPublison Posts: 12,366
    edited 2014-08-13 16:09
    Linus did a great demo a few years ago with some awesome, (fast), Mandelbrot.

    http://www.linusakesson.net/scene/turbulence

    Source Code:

    http://www.linusakesson.net/scene/turbulence/source.php
  • overclockedoverclocked Posts: 80
    edited 2014-08-13 22:21
    Thanks guys, what a community! Some great tip already.
    I can see why people are staying with this platform for longer times.

    Publishon: Thanks, what a demo. I will look into that and trying to run it on the FPGA-version.

    Ariba: OK. I actually never worked just with decompressing these formats. I wonder if a combination of C-code from known libraries and optimization in PASM would work? Have you heard of anyone trying that combination?

    Electrodude: Sounds great. Please see if you could find those pieces of code. Even if they are hard to read, at least they can be compiled and looked at for everyone. And yea maybe I'll invest in a real P1 in future if I get hooked in with these labs.

    Anyone else who have some ideas of what to write or know of something already written in the mentioned categories?
  • pik33pik33 Posts: 2,366
    edited 2014-08-13 23:06

    5) Any Propeller BrainFu**?

    Anything else that somebody is missing in the realm of Graphics/VM's?


    Last edited by Publison; Today at 01:07 AM. Reason: Inappropriate Language

    The Brainf*** is the name of the programming language
  • prof_brainoprof_braino Posts: 4,313
    edited 2014-08-14 08:05
    Anyone heard of implementation of these?
    2) A monitor/hex editor running on the Propeller. Either Serial-port or combination TV/VGA-output+PS/2 keyboard to be able to list memory contents and also write/change memory

    If you have an open mind, the PropFORTH kernel might be counted as a monitor/editor. Any of the standard kernels work with a generic terminal program on the PC. The JupiterACE version runs on the Prop Demo board with VGA and keyboard, no mouse.
  • ElectrodudeElectrodude Posts: 1,658
    edited 2014-08-14 08:23
    Here's my mandelbrot renderer. It renders a frame in 6 cogs, showing progress on the screen as it goes, and then does it again but zoomed in more when it's done. It doesn't double buffer right now but you just have to uncomment two lines and replace two others to make it do so, but then it gets boring because it's slow. It does dithering, so there are 6 colors for outcoloring. If you severely reduce the screen resolution and enable double buffering, it will probably go fast enough to call it a real-time zoomer. I don't have a propeller with me to test if it would actually be fast enough with a lower resolution. You can change where it zooms in to by changing the x_focus and y_focus constants. I think you might be able to change the position of the binary point in the fixed point calculations to some extent, but I don't know how much you can change it. Yes, there are two different fixed point positions - I forget why I did this (I wrote it about two years ago) and really should change it. And yes, there are also two separate multiply routines - I had to get every last bit of precision out of it.

    I just saw Linus's assembler. I'm going to have to steal all of his ideas and put them into my compiler, if my compiler ever gets done (it might not if I get too distracted using his assembler).
  • JLSJLS Posts: 76
    edited 2014-08-15 00:56
    Nice mandelbrot example :-)

    Is possible remake wireworld example from fpga Prop2 to Prop1 (lite memory and speed version) ?

    Thanks

    Kamil
  • ElectrodudeElectrodude Posts: 1,658
    edited 2014-08-15 07:11
    Thanks!

    While it would be easy to make a wireworld simulator on the P1, I don't think the wireworld computer would fit, at least the version that comes with Golly. It's 568*903 cells, which would come out to 128226 bytes at 2 bits per cell for only a single buffer (and you kind of need two but can get away with only one full buffer and one or two individual lines for work, but that makes using multiple cogs almost, if not completely, impossible). That's 4 times more ram than the P1 has. You could do it with external ram, but that's more hardware. The version in Golly is very sparsely populated, and there is another version somewhere with the display moved to the side (I forget which side) of the register bank that probably fits in a smaller area, but I still doubt it would fit in a P1's ram. What you might be able to do if you don't want external ram is store a single copy of just where the wires are (1 bit per cell), possibly in EEPROM if you don't care about speed, and then only store a quadtree of electrons in hubram. I'm still not sure if this would fit in hubram, but it probably would fit, because the computer is 50% empty space and, of the space that is filled, way less than half has any electrons (only one register indexer, which are the biggest parts, is ever all lit up at a time).

    There's an fpga P2 wireworld? I completely missed it.
  • JLSJLS Posts: 76
    edited 2014-08-16 04:56
    Old thread is here

    http://forums.parallax.com/archive/index.php/t-147457.html

    but spin code is not available any more
  • JLSJLS Posts: 76
    edited 2014-08-16 05:07
    Very simple Wolfram CA

    This is only spin version pasm would be better but im very bad programmer :-)
  • BaggersBaggers Posts: 3,019
    edited 2014-08-16 14:30
    Hi all!

    After using google for a while I though I ask here and see if I found anything?
    I'm thinking about writing something new as a learning experience while trying to port Propeller FPGA to Xilinx an also other Altera development boards.
    For the record I never owned a Propeller and I'm still trying to get the FPGA-version going.. :-)
    Anyone heard of implementation of these?

    1) PASM Mandelbrot? Optimized Mandelbrot written in assembler and working real-time zoom? I've seen some SPIN-code examples but not really anything realtime..

    2) A monitor/hex editor running on the Propeller. Either Serial-port or combination TV/VGA-output+PS/2 keyboard to be able to list memory contents and also write/change memory

    3) 3D engine? I've seen a movie of polygon hat spinning and also some movies of wireframe hat. Is the source for these open? Anyone know if those are written in SPIN or assembler?

    4) I've seen at least one Chip8 emulator so anyone seen any Chip16 emulators? This platform is not as well known but I've done some work with the platform (C# emulator and some Chip16 binaries) so probably a nice hack.

    5) Any Propeller BrainFu**?

    Anything else that somebody is missing in the realm of Graphics/VM's?

    Hi overclocked,

    And electrodude

    I wrote the wire world for the old Prop2, it was quite slow with the screen in external SDRAM, so I'm really looking forward to rewriting it for the new Prop2, as it has enough HUB-RAM to have it in internal RAM rather than SDRAM so the display driver won't hog most of the bandwidth, plus with 16 cogs to play with, it should fly :D

    overclocked, I also wrote the 3D Wolfenstein textured renderer demo for the original Prop1, as well as some solid 3D demos.
  • BaggersBaggers Posts: 3,019
    edited 2014-08-16 14:38
    That whole demo, title screen, gun and all wall textures, code, level layout, panel, all fit into 32KB too :D
  • ColeyColey Posts: 1,110
    edited 2014-08-16 14:43
    Blimey Jim that was nearly 5 years ago.... how time flies ;-)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2014-08-16 19:01
    Still an awesome demo!

    Hey Baggers, what bribe could we offer to get you to port that to VGA output? :)

    Jeff
  • LawsonLawson Posts: 870
    edited 2014-08-16 20:42
    Thanks!

    While it would be easy to make a wireworld simulator on the P1, I don't think the wireworld computer would fit, at least the version that comes with Golly. It's 568*903 cells, which would come out to 128226 bytes at 2 bits per cell for only a single buffer (and you kind of need two but can get away with only one full buffer and one or two individual lines for work, but that makes using multiple cogs almost, if not completely, impossible). That's 4 times more ram than the P1 has. You could do it with external ram, but that's more hardware. The version in Golly is very sparsely populated, and there is another version somewhere with the display moved to the side (I forget which side) of the register bank that probably fits in a smaller area, but I still doubt it would fit in a P1's ram. What you might be able to do if you don't want external ram is store a single copy of just where the wires are (1 bit per cell), possibly in EEPROM if you don't care about speed, and then only store a quadtree of electrons in hubram. I'm still not sure if this would fit in hubram, but it probably would fit, because the computer is 50% empty space and, of the space that is filled, way less than half has any electrons (only one register indexer, which are the biggest parts, is ever all lit up at a time).

    There's an fpga P2 wireworld? I completely missed it.

    Sounds like some form of sparse/compressed wire-world representation would work better than a flat bit-map? I.e. like a tiled text video display?

    Marty
  • overclockedoverclocked Posts: 80
    edited 2014-08-17 02:27
    Baggers wrote: »
    Hi overclocked,

    And electrodude

    I wrote the wire world for the old Prop2, it was quite slow with the screen in external SDRAM, so I'm really looking forward to rewriting it for the new Prop2, as it has enough HUB-RAM to have it in internal RAM rather than SDRAM so the display driver won't hog most of the bandwidth, plus with 16 cogs to play with, it should fly :D

    overclocked, I also wrote the 3D Wolfenstein textured renderer demo for the original Prop1, as well as some solid 3D demos.

    Simply incredible Baggers, Thanks for the Video link!
    Well it seem that 3D has really be accomplished already on the Propeller.
  • BaggersBaggers Posts: 3,019
    edited 2014-08-17 02:54
    Thanks guys :D

    Jeff, my only worry would be the difference in time between the VGA V-Blank and TV's V-Blank timing, which is where all the rendering takes place, especially since the Prop1 doesn't have enough RAM to double buffer the display.

    Coley, yeah where did those 5 years go! wow

    overclocked, it's amazing actually how competent the prop1 is.

    Lawson, I'm looking forward to seeing how fast it runs on the new prop2 once the FPGA image is out, as with 16 cogs to play with and it being able to fit the display in HUB-RAM it should be a shed load faster than the old P2 version ran.
Sign In or Register to comment.