My Garden

My Garden

aaron-baugher

subscribers

Got about half the garden space planted before the latest big rain. Some of the early stuff seems to have drowned or failed to germinate because it was still too cold, especially the sweet corn, so that will have to be replanted. But the early potatoes are doing well, and there should be more early crops up soon. Harvested almost 8 pounds of asparagus so far and a few radishes.

Added a routine to create a dialog box for talking to neighbors in the game.

Added a routine to copy 64-byte blocks from bank 1 to bank 0, so we can take full advantage of the second bank of RAM for file space. Also bug hunting, as a previously tested routine turned out to be clobbering a location unexpectedly.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

This is a montage of several short videos taken from late March to April as I get started on the garden for this year. Includes a very quick explanation of how to make bean tepees, so if you want more details on that, please ask in the comments.

No programming in this one, just deciding on the graphics system for the Farm game. Along the way I explained the different text modes on the VIC-II a bit: standard, multicolor, and extended background. But in the end I decided to use the 80-column screen, so we'll get to use the routines we wrote recently for that.

Added a routine to load a file, and then started on padding the message data. I noticed when watching this that the loadfile routine doesn't get the first two bytes of the file, because the file is a PRG so it expects the first two bytes to be the load address. Have to fix that next time, and then finish up the message padding.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

Finished part 3 and 4 of the computation loop. Next step will be to write the part to load in a file and do the message padding.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

A short one this time, as we fix the bugs in the dot-plotting routine from last time. Now we can setup graphics mode on the 80-column screen and set and clear bits using x/y coordinates. We're finished with it for now, and will come back to these routines for programs that want to do 80-column graphics.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

I took a couple of extra days to kick around idea on prepping the message schedule, because I got stuck on that one, trying to abstract too much. It finally hit me to create four simple copy routines rather than one overly abstract one, and then that part came together. It should be easier from here on out, and next time we should get into loading in a file and padding it.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

I've had a couple requests to explain my programming environment, so here it is. I use keyboard-driven tools and have things setup to let me switch around between tools as quickly as possible, so it's probably not always easy to follow. Please ask if you have any questions. I don't claim this is the optimum setup for anyone else; this is just what works for me.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

Honestly, this one's pretty light on coding, so unless you're determined to watch every minute, it might be one to skip. I started on what I think will be the hardest part of the algorithm, preparing the message schedule, which operates on a sliding window of memory locations, so I spent most of this one thinking about and discarding different ideas for doing that. Next time I'll have that nailed down so we can get back to the easier parts and make better progress.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

Demostrated how attributes -- color, flash, underline, etc. -- work on in the VDC 8563 text display. Then shifted to the VDC's graphics bitmap and started writing routines to clear/fill the bitmap display and plot points on it. Stopped with a couple bugs in the code that we'll fix first thing next time.

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

It's too muddy to get in the garden for real yet, but I thought I'd move these marshmallow herb plants now that the ground was thawed. We planted them in this little flower bed a couple years ago, not realizing how big they'd get, and they kind of crowd everything out. The digging was harder than I expected, because they grew down into a pretty thick layer of rock, so I couldn't bring them up with a nice dirtball. That probably won't hurt anything, since herbs, especially perennials, tend to be pretty tough.

Once I had this one dug up, it started falling apart into several different plants, so it was already dividing itself. I planted five of them along a concrete wall where I've been wanting to put some cover. I have a feeling the remaining roots will come up again, so I may have to put plastic or something down for a while to snuff them out.

Also planted a few peas and radishes right behind these a couple days previously, just pressing them into the mud, but it's too soon for them to be up. I saw some chickens loafing there the next day, so they may have gobbled up the seeds already.

Continuing on the SHA-256 program, we create more low-level routines for copying chunks of data in different ways, and the remaining low-level SHA functions.

If you would like to contribute to support these videos, please see my Patreon at https://patreon.com/aaronbaugher . Thank you!

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

The chickens are enjoying the warmer weather, now that the ground is thawed and they can scratch for worms again.

Started writing routines to drive the 80-column display, starting with the most basic ones to write to the registers, and then building on those. The routines here are all for the text screen, and next time we'll start on bitmap graphics. I expect to use these for the Farm game, but they will make up a library that many programs could use.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

Here's a whiteboard tutorial on programming the 80-column screen on the Commodore 128. It's very different from the 40-column VIC display, since you have no direct access to 80-column screen memory and have to program it indirectly by reading and writing to the VDC's registers, which requires a handshaking process through a pair of registers at $D600 and $D601 in the C128's I/O block.

There will be another video soon demonstrating how to use the little routines here to do actual work.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

I'm starting two new programs, and this should be the shorter one (the other will be a game, first video coming soon). I thought it'd be interesting to see how well an 8-bit machine could handle work designed for 32-bit (or more) processors. So far so good; the low-level functions went faster than I expected, but next time we'll get into the harder stuff. See the "part 0" video (#24) for details on what SHA-256 is all about; this one dives straight into the programming.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

Memory management (banking) in the C128 is unlike the C64 or other 8-bit Commodores, since it uses the MMU to switch blocks of ROM and RAM in and out of service. This can seem kind of complicated at first, but it's essential to taking full advantage of the resources that the C128 provides, so I thought I'd do a whiteboard tutorial on how banking works and how to do it in assembly.

Looks like I still need to work on lighting. I added a lamp, but there are still some shadows. I hope that doesn't make it too hard to read my handwriting.

You can find related resources and a link to the code repository for the series here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

Finished the Worm game! Added the score display and the choice to play again or exit to a Ready prompt, and made it auto-boot from a disk image. Created and fixed bugs along the way, as usual.

It now functions pretty much identically to the BSD version. It could be dressed up with more features, like sound or more colors, so if anyone wants to fork the source code from the repository and do that kind of thing, please feel free. I'm going to move on to a more elaborate game and some other projects. Suggestions are welcome as always.

You can find related resources and a link to the code repository here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

Continuing on the Worm game, we change the colors, adding a routine to fill color RAM the same way screen RAM is filled. We put a delay in the keyboard routine, and a time limit so it repeats your last move if you take too long to press a key.

You can find related resources and a link to the code repository here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

The stack gets a lot of use in 6502 programming, so I thought I'd walk through a demonstration of how it works, the pitfalls to look out for, and how to manipulate the stack pointer when necessary.

One note on the last example: instead of TSX / 6xINX / TXS, it would be faster to simply PLA six times to move the stack pointer down six bytes. But this demonstrates how to manipulate the pointer directly, when that makes more sense.

Continuing on with the Worm game, we add code to keep the tail pointer-to-pointer (TAILP) up to date, to extend the length of the worm when necessary, and to handle collisions with numbers on the screen.

You can find related resources and a link to the code repository here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

Another mid-week bonus video in between working on the game series. I covered the indirect addressing methods in video #14 along with the others, but I've seen a couple questions about them, so I thought a whiteboard demonstration focused on the indirect methods alone might help.

I know the production quality on these isn't very good. Seems like the audio is better in this one, recording it with my phone in my shirt pocket and muxing that with the video later. Lighting could still be better, though. I'll keep working on it.

You can find related resources and a link to the code repository here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

While coding on the Worm program in video #16, I realized we would need pointers to pointers, or double-pointers. I didn't think my explanation with code was very clear, so I thought it'd be useful to draw it out visually. We will use this method to keep track of segments of the worm in order from head to tail as it moves around the screen, so we can drop the correct tail segment on each move.

You can find related resources and a link to the code repository here: https://aaron.baugher.biz/pages/6502-assembly-language-programming/

SHOW MORE

Created 1 year, 9 months ago.

96 videos

CategoryVlogging

Videos from my garden and related topics, showing the progress throughout the year.