Jump to content

Yazwho

Members
  • Posts

    109
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Yazwho

  1. Aye, you need to shift each the layer by the difference of the height of the tile and the height of the graphic using a line interrupt.
  2. For simple isometric playfields I'd use two tile layers, one for each row of tiles. Each tile is a graphic in a diamond shape so they can be linked as you'd imagine an isometric display would be. The layers are then offset by half a tile, so they interlock as below. The green tiles could include imagery that overlaps the red tiles, so you could create some pretty landscapes easily. If you want to get fancy then you can switch the layers using line interrupts on lines that are half way through a tileset. This would mean red tiles can also be above the green. Below are 16x16, but you could of course do 16x8 or 8x8 or use line interrupts for other smaller dimensions, depending on how you want it to look.
  3. Yazwho

    BitMagic

    I'm on the 'Official Commodore Amiga' discord, which is a good place to ask questions. ( https://discord.gg/MQ6Mfwk ) The 'English Amiga Board' is also a good resource. ( http://eab.abime.net/index.php ) I'm using VSC with the Amiga Assembly extension to compile with vasm and run (+debug) in WinUAE. I have an A500 and 1200, but no small monitor right now, when I pick one up I'll use those for final testing. The copper and the blitter are where I started as well. Both are very interesting to code against. Didn't take long to knock up the app below. (Its animated, so looks a bit better than below!) While the X16 doesn't need such systems, it's a shame it doesn't have them. It makes developing for the system so much more interesting.
  4. Yazwho

    BitMagic

    I've added code to the image library to take an image and turn it into tiles. Eg, the following code takes logo.png and turns it into 1bpp tiles, and adds a full tile so we know it will be tile #1. (tile #0 is empty and is always added by setting a parameter) public class Logo { private TileData? _tileData = null; public void LoadLogo() { var image = ImageProcessor.Processor.LoadImage(@"logo.png"); // flip pixels for(var i = 0; i < image.Pixels.Count(); i++) image.Pixels = image.Pixels == 0 ? (byte)1 : (byte)0; // add a full set so we know it will be in position #1 var toAdd = new Tile(8, 8, Depth.Bpp_1); for(var x = 0; x < 8; x++) for(var y = 0; y < 8; y++) toAdd.Pixels[x, y] = 1; _tileData = ImageProcessor.Processor.CreateTileMap(image, ImageProcessor.Depth.Bpp_1, ImageProcessor.TileSize.Size_8, ImageProcessor.TileSize.Size_8, false, true, ImageProcessor.TileExcessHandling.Error, new [] { toAdd }); } public IEnumerable<byte> TileMapData() { foreach(var m in _tileData.Map) { yield return m.Index; yield return 0x01; } } public IEnumerable<byte> TileData() { foreach(var tile in _tileData.Tiles) { foreach(var b in tile.Data()) { yield return b; } } } public int Height => _tileData.MapHeight; public int Width => _tileData.MapWidth; } This can then be used: VideoMemory.Copy("tiles", 0x2000, logo.TileData().Count()); and .tileMap: BM.Bytes(logo.TileMapData()); .tiles: BM.Bytes(logo.TileData(), 8); However, I'm going to stop development on the X16 bits while I concentrate on the developing for the Amiga. I'm sure I'll pick this back up at some point, although mostly to generalise the macro compiler to other chipsets -- namely the 68000 -- and to remove the basic X16 emulator to retarget the project in a more general direction.
  5. Yazwho

    BitMagic

    Nope. I had the wrong text, thanks!
  6. Yazwho

    BitMagic

    The assembler part now supports embedded procs, and correctly scopes them. (Scopes set with the .scope command still work in the same way.) The end of the proc is also tagged with a constant called 'endproc' if a definition with that name doesn't exist. One thing to note, referencing constants that are defined later in the file will always be assumed to be 16bit, so defined 8 bit ones earlier in the file. This is important for commands like lda to get the right opcode. All of this is demonstrated below: .machine CommanderX16R40; .const a = $01 .proc proca .const a = $02 lda #a ; $02 ;lda #procb:a ; $03 doesn't work yet lda procb:b ; $1234 .proc procb .const a = $03 .const b = $1234 lda #a ; $03 .endproc lda #a ; $02 lda #procb:a ; $03 .endproc lda #a With the output: $0801: $A9, $02 LDA #a $0803:* $AD, $CD, $AB LDA procb:b $0806: $A9, $03 LDA #a $0808: $A9, $02 LDA #a $080A: $A9, $03 LDA #procb:a $080C: $A9, $01 LDA #a Revaluations: $0803: $AD, $34, $12 LDA procb:b and the constants: App:Main:a = $01 App:Main:proca = $801 App:Main:proca:a = $02 App:Main:proca:procb = $806 App:Main:proca:endproc = $80C App:Main:proca:procb:a = $03 App:Main:proca:procb:b = $1234 App:Main:proca:procb:endproc = $808
  7. Yazwho

    X4096

    34 downloads

    A new little intro, featuring full frame rate vectors! Original music by cerror. See their other music here: https://modarchive.org/index.php?request=view_profile&query=85822 Thanks! R38: Working R39: Working R40+: Untested
  8. X4096 View File A new little intro, featuring full frame rate vectors! Original music by cerror. See their other music here: https://modarchive.org/index.php?request=view_profile&query=85822 Thanks! Submitter Yazwho Submitted 04/11/22 Category Demos  
  9. If no one is going to take an income from it then it should definitely be 'Non profit', for the tax and licensing breaks at the very least. As you can see from the recent posts financing isn't the problem. It appears to be a mix of technical and managerial problems. Of course supporting content creators is a good thing, but dont think sending money now will hurry up this particular project.
  10. As soon as the project isn't 'for profit', sure.
  11. Yazwho

    BitMagic

    In an attempt to be more generic I've added the ability to target individual 'machines'. The only two so far implemented are the X16 R38 and R39, but hopefully I'll add more later. (The ability to target just a CPU is on the todo list, eg 6502 or 65c02.) This gives us a handy feature, in that we can check the version in both libraries and the main csasm file as the Template Engine constructs the bmasm file. For example: if (BM.Machine.Name == "CommanderX16") { if (BM.Machine.Version <= 38) { lda #38 } else { lda #39 } sta version } A practical use would be switching look up tables for the YM2151. The machine you're building can be set in both the csasm and the bmasm. csasm: machine CommanderX16R38; bmasm: .machine CommanderX16R38 As an aside; a machine for the compilation is just a set of constants, so for example the rom bank switch location would be mapped correctly to the 'RAM_BANK' constant depending on if you target R38 or R39.
  12. Forth -- wow, that's something I've not heard in a while. Welcome!
  13. That's certainly jumping in feet first! Welcome!
  14. Yazwho

    BitMagic

    Introducing BitMagic! BitMagic is -- currently -- a macro assembler and a compiler for the X16, that utilises C# and the dotnet build chain to provide us with the ability to write macros to a much greater degree of complexity than offered by traditional assemblers. The ideal being that there will no longer be a need to write external applications to construct what we're trying to do, especially with assets. There are a few things to do, most importantly implement any missing 65c02 opcodes, but it is nearing a usable state so it felt like the right time to at least share. Instead of cut/pasting the text on the GitHub repository, you can read all about it here. However, an picture is worth a thousand words, so as an example here is the code for this downloadable demo. It is assembler -- honest! assembly "..\..\Libraries\Compression\bin\Debug\net6.0\Compression.dll"; assembly "..\..\Libraries\ImageProcessor\bin\Debug\net6.0\ImageProcessor.dll"; assembly "..\..\Libraries\Vera\bin\Debug\net6.0\Vera.dll"; using Compression; using ImageProcessor; using Vera; BM.X16Header(); // byte code to start execution. VideoMemory.SetCopyZpWordAddress(0x00); // define where in ZP the copy can use. Inflator.SetSourceZp(0x00); // define where in ZP we can use for inflating. Video.Mode(Layers.None); // disable all layers and sprites while the image inflates. Video.Scaling(Resolution.Half); // 320x240 Video.LayerBitmap(ConfigLayer.Layer0, Depth.Bpp_8, BitmapWidth.Half_320, 0x1000); ; in case colour 0 is not black! lda #$11 sta ADDRx_H lda #$fa sta ADDRx_M stz ADDRx_L stz DATA0 stz DATA0 ; call decompress Inflator.InflateToVram("compressed_data", 0x1000); var imageData = ImageAsset.LoadFullImage(@"Assets\bliss.bmp"); ; copy palette to vera VideoMemory.Copy("palette", 0x1fa00, imageData.X16Colours.Length); Video.Mode(Layers.Layer0); // turn on layer 0 to show the image. ; infinite loop .loop: jmp loop Inflator.InflateToVramCode(); // decompressor proc code. VideoMemory.CopyProc(); // copy proc code. .palette: BM.Bytes(imageData.X16Colours); var compressed = Deflator.Deflate(imageData.Pixels); ; Source data is @(imageData.Pixels.Length) bytes. ; Compressed data is $@(compressed.Length.ToString("X4")) bytes. .compressed_data: BM.Bytes(compressed); ; scratch space for decompression. .segment Variables, $400 Inflator.DefineScratchArea(); .endsegment Thanks for reading, and I hope you find it at least interesting!
  15. Version 1.0.0

    20 downloads

    The BitMagic example. It decompresses (inflates) a 320x240 256 colour image, from the 32k .prg file.
  16. BitMagic Example View File The BitMagic example. Submitter Yazwho Submitted 02/13/22 Category Demos  
  17. Wow, that is some effort indeed! Good skill! Edit: Sounds awesome, like someone has poured the 80s into the air con!
  18. Exactly, thanks, thats very interesting. So its essentially turning the GB into an instrument? Is this unique to the GB (I guess as its portable) or do people do this with all sorts of other consoles?
  19. Blimey, that's very fun. I do like the GBA cart with the embedded chips! https://www.nanoloop.com/two/index.html
  20. What's the MIDI IN and MIDI cable for? Is this a common thing now? (or back then?)
  21. Hmm, literally nothing is under construction. Not convinced!
  22. 19 downloads

    Edit: I am not currently developing this project. I'll leave this here as it might be interesting to someone! Happy New Year all! Given the site is a bit slow, I thought I'd show off the latest version of my player. The biggest change in the latest version is that the commands now have 2 bytes of variable space to store their state, hopefully leading to some more interesting effects. You can hear an example with the 'warbling' on the track included. It's not vibrato by any stretch, but adds a little something. Hopefully you can hear the difference to the previous version here and agree its an improvement! (I am by no means a musician, so your mileage on that may vary!) The 'tracker', BitPlayer, that I'm using and developing is still relatively basic in terms of its UI, but is slowly but surely maturing. This uploaded .prg file is what is produced when the X16 emulator is launched from the tracker. It's all hosted on Gitlab here. The .json file attached is the 'mod'. There are of course a fair few things to do, the list is something like this: PCM support Change the output to my own new templating engine instead of ca65 YM2151 support (X8 depending) Change the sound engine to use a common engine with the emulator that better represents the X16 - Probably by embedding a emulator directly into the application The new templating engine removes all the typical restrictions that 'macro assemblers' can have. It's written in c# and is currently based on the Razor engine. As such it's easy to embed within an application like BitPlayer to produce 65c02 asm. The engine and the compiler have a little way to go, but if you're interested there is more information here. The track was originally by Archyx and can be found here.
  23. BitPlayer - Jan 2022 View File Happy New Year all! Given the site is a bit slow, I thought I'd show off the latest version of my player. The biggest change in the latest version is that the commands now have 2 bytes of variable space to store their state, hopefully leading to some more interesting effects. You can hear an example with the 'warbling' on the track included. It's not vibrato by any stretch, but adds a little something. Hopefully you can hear the difference to the previous version here and agree its an improvement! (I am by no means a musician, so your mileage on that may vary!) The 'tracker', BitPlayer, that I'm using and developing is still relatively basic in terms of its UI, but is slowly but surely maturing. This uploaded .prg file is what is produced when the X16 emulator is launched from the tracker. It's all hosted on Gitlab here. The .json file attached is the 'mod'. There are of course a fair few things to do, the list is something like this: PCM support Change the output to my own new templating engine instead of ca65 YM2151 support (X8 depending) Change the sound engine to use a common engine with the emulator that better represents the X16 - Probably by embedding a emulator directly into the application The new templating engine removes all the typical restrictions that 'macro assemblers' can have. It's written in c# and is currently based on the Razor engine. As such it's easy to embed within an application like BitPlayer to produce 65c02 asm. The engine and the compiler have a little way to go, but if you're interested there is more information here. The track was originally by Archyx and can be found here. Submitter Yazwho Submitted 01/09/22 Category Demos  
×
×
  • Create New...

Important Information

Please review our Terms of Use