I started out CS, switched to CpE before classes started, at some point switched to EE, and then switched back to CpE.
|
|
# ? Jun 2, 2017 17:43 |
|
|
# ? May 9, 2024 23:13 |
|
Anyone got suggestions for diving into assembly programming (Z80, 6502, etc.)? I've been interested in it ever since I put together a CHIP-8 VM but never really figured out how to get started with a deep dive, especially on OSX.
|
# ? Jun 2, 2017 18:12 |
I'd suggest ARM assembly. It's a neat language to learn, and there are a LOT of ARM devices to use.
|
|
# ? Jun 2, 2017 19:30 |
|
Mr. Powers posted:I'd suggest ARM assembly. It's a neat language to learn, and there are a LOT of ARM devices to use. Sounds interesting, but my Google Fu is failing me - I'm not sure what toolchain I should use, or how to write the files and everything. Seems like there's a lot of one-off options out there for OSX but no commonly agreed-upon answer, especially for something that seems relatively basic like assembly programming. A newbie's guide would be really helpful, especially if it's OSX-specific! I might also hunt down a book or something for some guidance...
|
# ? Jun 2, 2017 19:55 |
|
Why do you think you want to program directly in assembly? e: play TIS-100 instead
|
# ? Jun 2, 2017 19:56 |
peepsalot posted:Why do you think you want to program directly in assembly? I was thinking the same thing, just play really any Zachtronic game if you have nothing in particular you want to accomplish.
|
|
# ? Jun 2, 2017 20:05 |
It looked like Human Resource Machine was a good assembly intro, too.
|
|
# ? Jun 2, 2017 20:09 |
|
Pollyanna posted:Sounds interesting, but my Google Fu is failing me - I'm not sure what toolchain I should use, or how to write the files and everything. Seems like there's a lot of one-off options out there for OSX but no commonly agreed-upon answer, especially for something that seems relatively basic like assembly programming. A newbie's guide would be really helpful, especially if it's OSX-specific! I might also hunt down a book or something for some guidance... I'm at work right now so I can't reference much, but hit me up later and I'll try to find some of the info I used when I was hacking on the Nintendo DS Hint, arm assembly is really niche and there aren't really any in depth guides. I learned a lot by disassembling homebrew demos
|
# ? Jun 2, 2017 20:31 |
|
Hi Pollyanna. Part of my day job is writing ARM assembly. There's a small chance a device you own runs my fast memcpy implementation. I would recommend starting off with an ARM Cortex M3. Simple enough to understand without being overly limited. Plus they're as cheap as dirt. A board with an integrated debugger that runs off a single USB cable is under $15 shipped. I found the best way to get familiar with assembly language was to write some C code, look at how it compiles, then check out the ARM reference manual to find out what the instructions do. More detail here. They are terribly unclear manuals very obviously written by hardware people, but you'll get a feel for it after a while. If you'd like, I can give you a whole project with commented example assembler you can open in IAR EWARM. (Not sure if it runs on OSX). It has a simulator so you don't need any hardware to run code. It's a crap IDE, but fairly straightforward and will allow you to assemble code and step through it. It's free to use as long as the project compiles to 32KB or less (get the Kickstart version). Only restriction is that to see the assembly output of a C program you have to run it in the simulator and step through. Spatial fucked around with this message at 22:16 on Jun 2, 2017 |
# ? Jun 2, 2017 21:18 |
Do you work for IAR?
|
|
# ? Jun 2, 2017 22:02 |
|
No, but I do use EWARM at work. Sometimes this results in posts to the coding horrors thread. Hoping to cut some IAR fools?
|
# ? Jun 2, 2017 22:07 |
No, I like IAR. Good toolchain, but the IDE is about a decade behind where it should be.
|
|
# ? Jun 2, 2017 22:09 |
|
Write homebrew video games for old consoles NES has a lot of tools and is documented inside and out. 6502 assembly is pretty fun. cc65 is a C compiler and assembler combo that can spit out NES ROM images.
|
# ? Jun 2, 2017 22:17 |
|
IAR, go to the definition of this function. *nothing happens* *fart* IAR, autocomplete this name. *the screen flickers, then nothing happens* *fart* Thankfully searching works well enough.
|
# ? Jun 2, 2017 22:20 |
Spatial posted:IAR, go to the definition of this function. *nothing happens* *fart* The eclipse plugin is a little hokey, but it works and lets you use a modern IDE.
|
|
# ? Jun 2, 2017 22:25 |
|
I'll have to give that a shot, thanks.
|
# ? Jun 2, 2017 22:44 |
|
Silver Alicorn posted:Hint, arm assembly is really niche and there aren't really any in depth guides. I learned a lot by disassembling homebrew demos
|
# ? Jun 2, 2017 22:58 |
JawnV6 posted:How's that now? Cause everyone is actually using Thumb mode.
|
|
# ? Jun 2, 2017 23:14 |
|
Luigi Thirty posted:Write homebrew video games for old consoles That's what I wanted to do. This all started because I wanted to try writing a Game Boy emulator, then decided it'd be easier to learn assembly first, so I started looking into the Z80 and 6502. I was looking for tools and resources on programming the latter (i.e. NES) for my first venture. I got stuck on finding a way to assemble 6502 ASM on OSX, though. It seems that I can use cc65 on OSX though! I haven't the faintest on how to get IO stuff happening so I can see what happens if I do X Y Z, but I think I can figure that out. And yes, I've played TIS-100, Shenzhen IO, and am currently playing Human Resources Machine. They're very fun (though TIS-100 made me want to die at points).
|
# ? Jun 2, 2017 23:17 |
|
The Nesdev wiki documents pretty much everything.
|
# ? Jun 2, 2017 23:30 |
|
Luigi Thirty posted:The Nesdev wiki documents pretty much everything. If this will help me learn 6502 assembly as well as NES dev, then I'll start here for sure. Thanks! Edit: aaand I'm already lost. I'll figure it out somehow, though. Pollyanna fucked around with this message at 00:39 on Jun 3, 2017 |
# ? Jun 2, 2017 23:32 |
|
Pollyanna posted:If this will help me learn 6502 assembly as well as NES dev, then I'll start here for sure. Thanks! The Something Awful Forums › Discussion › Serious Hardware/Software Crap › The Cavern of COBOL › aaand I'm already lost. The Embedded Programming Microthread!
|
# ? Jun 3, 2017 04:20 |
|
Popete posted:Cause everyone is actually using Thumb mode. Not in 64 bit they're not.
|
# ? Jun 3, 2017 13:39 |
Everyone should be using Universal ARM Assembler.
|
|
# ? Jun 3, 2017 14:07 |
|
I'm really impressed with ChibiOS' HAL component after only a day of messing around and integrating it into my build system. I'm kinda leaning towards getting rid of a collection of ST CubeMX and HAL uses left by my predecessors and replacing it with this. Using FreeRTOS, but the osal abstraction seems like it'll be pretty clean. Any drawbacks I should look out for or should I plunge into it?
|
# ? Jun 4, 2017 18:24 |
My time with ChibiOS was miserable.
|
|
# ? Jun 4, 2017 19:22 |
|
I'm more interested in the HAL with prewritten drivers that use DMA and that optionally support an RTOS. Tired of seeing vendor libraries where the UART driver spins on the transmit register empty flag. What didn't you like?
|
# ? Jun 4, 2017 23:07 |
The internals are all over the place and a bunch of default behaviors are completely not realtime unless you flip a switch to nondefault behavior. It also choked under heavy interrupt load (i.e. crashed), so I suspect there is a bug in the port. This was back in 2.x, though.
|
|
# ? Jun 4, 2017 23:50 |
|
The HAL drivers seemed fairly awful (slow and unergonomic) when I tried using them, but portability isn't a huge concern for what I'm doing so it might be more painful than just going your own way if you need enough different chips to run the same code.
|
# ? Jun 5, 2017 02:55 |
The only ports for the HAL are for STM32s of various types. I don't know if that's really any more portable than CubeMX generated code.
|
|
# ? Jun 5, 2017 05:09 |
|
The CubeMX generates HAL code I believe. I just use manual register manipulation, because it's by far nicer to just work from the documentation, since there's not that much that the official code does for you that is actually good if you know what you're doing, the interface is mostly the same as the hardware with some slightly nicer register macros than the old libraries but with a ton of super obvious error checking to slow things down.
|
# ? Jun 5, 2017 05:41 |
|
After a couple of days of figuring out the correct incantation to get the RN42 bluetooth module working, i finally saw the leds blinking, the commands being written and responses being read. It's loving black magic and the documentation writers are the laziest people on the planet. If you change UART pin 0 to be pin 4, please loving update the drat poo poo so that i don't lose my mind. Or that the default state of the device is X instead of Y, that's fine, but would letting me know about it kill ya? Sigh. I'm on my way to finally have a bluetooth driver working. I need a beer .
|
# ? Jun 6, 2017 05:52 |
|
I hate doing low power stuff on small boards. Where's this power going? Who knows and nobody wants to spend hours cutting traces and putting in a bypass to measure
|
# ? Jun 6, 2017 17:29 |
|
Just put jumpers everywhere with a DNP 0ohm bypass
|
# ? Jun 6, 2017 17:37 |
|
JawnV6 posted:Just put jumpers everywhere with a DNP 0ohm bypass Even this is not so easy. What happens quite often then is that chips get powered on via IO-signal ESD protection diodes (there are internal diodes going from each each IO pin to Vcc and ground) and then they can work erratically or just fine. So you need to be really sure the things are ACTUALLY turned off by removing the jumper. 0 ohm jumpers is usually a good idea though, easier to work with them than cutting traces. There are some pretty neat power analyzers (from Keysight for example) which enable you to pinpoint power use to some certain lines of code etc.
|
# ? Jun 7, 2017 06:22 |
|
nmfree posted:The Something Awful Forums › Discussion › Serious Hardware/Software Crap › The Cavern of COBOL › aaand I'm already lost. The Embedded Programming Microthread! [Ask] me about figuring out how to drive a TMS5220 LPC speech chip using a 6502 accepting commands from a 68000, with speech data created using a program for Windows 3.1 from nothing but datasheets and MAME source code It works real well now though!
|
# ? Jun 7, 2017 08:40 |
|
Luigi Thirty posted:[Ask] me about figuring out how to drive a TMS5220 LPC speech chip using a 6502 accepting commands from a 68000, with speech data created using a program for Windows 3.1 from nothing but datasheets and MAME source code I would like to know more.
|
# ? Jun 7, 2017 14:51 |
|
TTerrible posted:I would like to know more. You'll get all that and more through his Patreon. This is the sort of stuff that I am happy to be a patron for.
|
# ? Jun 7, 2017 16:31 |
|
Hyvok posted:There are some pretty neat power analyzers (from Keysight for example) which enable you to pinpoint power use to some certain lines of code etc. "Boy howdy these wfi instructions are burning sooooo much power, better get rid of them!"
|
# ? Jun 7, 2017 16:37 |
|
|
# ? May 9, 2024 23:13 |
Anyone here a Keil user? I'm evaluating their middleware, and I'm a bit lost with their IDE. I've installed a bunch of support packs and tried to build the FRDM-K64 HTTP server example, but it doesn't build. It doesn't claim to be missing any packs anymore, but it looks like the API has changed with the example having not been updated with it. Maybe it's something easy.
|
|
# ? Jun 7, 2017 16:51 |