@bread80@mstdn.social avatar

bread80

@bread80@mstdn.social

Amstrad CPC, RC2014, Z80, Raspberry Pi Pico, TTL processors and the occasional bit of Eurorack

This profile is from a federated server and may be incomplete. Browse more on the original instance.

rasteri, to random
@rasteri@mastodon.scot avatar

Maybe not a great choice of location for this sticker

bread80,
@bread80@mstdn.social avatar

@rasteri And they phrase it like a challenge…

bread80, to random
@bread80@mstdn.social avatar

This is the table I now have. Columns are the input (variable) type. Rows are the primitive type.

A value of zero means no type conversion is necessary. A value >=10 means there's potential data loss. I.e. the type has to be shrunk[1].

[1] An example of this is the Peek() function. It needs to be able to accept Real and Integer types, but it needs to validate they're within range (if validation is on).

bread80,
@bread80@mstdn.social avatar

From this I generate a giant table to verify the fitness values will result in the optimal primitive being chosen.

This is less than half the number of columns in the table.

Each group of three columns is a possible combination of variable types. Each row is a possible combination of primitive parameters (types). The aim is to have the Sum column contain the lowest value for the optimal primitive.

bread80,
@bread80@mstdn.social avatar

The next step is to generate a similar table for constant values. Many numerical constants could be contained in multiple types, and signed or unsigned types.

Primitive selection here needs to take account of the other parameter, in particular whether it is signed or unsigned, to choose the optimal primitive.

bread80, to random
@bread80@mstdn.social avatar

I'm looking to optimise the primitive selection routine in . Currently it searches the table of available primitives multiple times until it finds a match, each time 'expanding' the types of the parameters. It's slow and it's messy.

My new plan is to calculate a 'fitness' value for each primitive using the type(s) of the input parameters. It's taken me three days just to work out how to create a spreadsheet to calculate and verify the values.

bread80, to random
@bread80@mstdn.social avatar

Assembly of the is progressing nicely. I’ve soldered on pretty much everything I have in stock. And I’ve recovered and transferred the larger parts from prototype build. Now to make up a list and go shopping for the remainder.

The other six modules. Again 40 pin sockets and the occasional resistor are the main missing components.

RetroFunPL, to retrocomputing
@RetroFunPL@8bit.red avatar

I'm tired of reading about AI all the time.

What's your favorite memory?

bread80,
@bread80@mstdn.social avatar

@RetroFunPL At my school the computer room cupboard contained three Commodore Pets. I ‘explored’ the ASCII control codes and found one which turned the text from all upper to all lower case.

Whenever we used them I’d switch the machine to lower case. If anyone asked why my machine was in lower case I just replied that it was broken.

bread80,
@bread80@mstdn.social avatar

@RetroFunPL Reading magazines and drooling over everything. Every computer looked exciting. The peripherals: printers, modems and expansions. The games. The business software. All those exotic sounding computer languages.

thelastpsion, to random
@thelastpsion@bitbang.social avatar

If I want to have any hope of learning to write device drivers in the future, I'm going to need to learn x86 (specifically 8086 and NEC V30) assembly.

That is DEFINITELY not a Today Problem. It's not even a This Year Problem.

bread80,
@bread80@mstdn.social avatar

@thelastpsion @kroc If you look at everything Intel designed in the 70s and 80s - x86, iAPX, 8080, 8008 - and I doubt there’s a single good design choice in any of it.

bread80, to random
@bread80@mstdn.social avatar

Finally arrived. After celebrating a little too long and hard over Chinese new year.

bread80,
@bread80@mstdn.social avatar

And looking even better once unwrapped. Now, where to begin?

bread80,
@bread80@mstdn.social avatar

@RetroFunPL 🙂🙂

bread80, to random
@bread80@mstdn.social avatar

“Use our online chat support. We’ll reply when we get around to it. Could be ten minutes, could be thirty minutes :shrug:. If you so much as blink we’ll terminate the session and you’ll have to go back to the beginning and start all over again.”

PS never use Bluehost. Regretted it the moment I set up the account.

bread80,
@bread80@mstdn.social avatar

And if anyone has suggestions for webhosts I’m all ears. My needs aren’t complex. Anything that just works with minimal maintenance and competent support.

bread80,
@bread80@mstdn.social avatar

The problem looks like some kind of nameserver glitch - it was redirecting to a temporary domain.

The support person has managed to ‘reinstall Wordpress’ which has deleted the entire site. They’re now preparing to restore a backup 🙈

bread80,
@bread80@mstdn.social avatar

@RetroFunPL I have backups switched on and can see the daily listing. I’ve downloaded several. I can see the server files but not the database content. I’m hoping I’m just missing something.

bread80,
@bread80@mstdn.social avatar

@tomkeddie I don’t think that’s what I’m after but thanks for the suggestion.

bread80, to random
@bread80@mstdn.social avatar

All of the operators are now passed over to the new data tables and primitive search. I'm moving onto intrinsics. These are small routines with function-like that often generate inline code, such as peek, inp and sizeof.

Many of these have quirks such as accepting multiple types, or a typedef. The quirk of Abs is unsigned values: in doesn't affect them. I could raise an error but it's nicer to fake the data to not generate any code.

An extract from the primitives spreadsheet. The row for Integer type is normal. The next two rows are for Byte and Word input types. The 'Proc' column contains 'empty' which signals the code generator to not generate any code.

bread80,
@bread80@mstdn.social avatar

I'm moving intrinsic to use the same data structure as a user created function. The compiler can then reuse the same code for parameter parsing and validation. I do this using an special calling convention 'Intrinsic' which is not available in users code.

And the type system now contains 'SuperTypes' to handle concepts such as 'AnyInteger or 'any Enumerated type'.

The image shows an extract from the data table for intrinsics which maps onto function definitions.

arturo182, to random
@arturo182@mastodon.social avatar

I don't think that's @flipper_zero's index finger 🤭

bread80,
@bread80@mstdn.social avatar

@flipper_zero @arturo182 The requirement for certification guarantees that every device with an HDMI port works with every other device. You can buy the cheapest tat off the internet and be sure it will connect properly. To me that’s a good thing.

And, it’s not a copyright issue. It’s a trademark one.

Cykelero, to gamedev
@Cykelero@mas.to avatar

This one dev's custom toolchain is absolutely bonkers. Sure, it's optimized for a specific problem space, but this feels utopic.

Not spoiling the details (the video is full of delightful twists), but let's just say that two minutes in, the author casually mentions that the whole game is incrementally recompiled and hot-reloaded for every single keystroke in the code editor. It goes way, way crazier from there.

https://www.youtube.com/watch?v=72y2EC5fkcE

bread80,
@bread80@mstdn.social avatar

@Cykelero When I bitch about how coding tools haven’t moved on since the 80s these are the kinds of things I’m talking about. Most changes we have are just tinkering with syntax and the like. We really should be seeking the revolutionary changes that move coding forward by orders of magnitude.

bread80, to random
@bread80@mstdn.social avatar

Returning to the Z80 ALU core implemented in relays. The first task is to redo the relay symbols. Kicads default generic relay shows the solenoid repelling the contacts, rather than attracting them. It's messing with my head.

In the image I've update the two symbols on the left. The rest are still defaults.

(PS Kicad only has a generic symbol for the single pole relay. I extended this to create the tow and three pole versions).

#RelayLogic

bread80,
@bread80@mstdn.social avatar

@trcwm And relay logic is a mind freak.

bread80,
@bread80@mstdn.social avatar

@coprolite9000 I’m very tempted. But I’d need a bigger house first!

The Z80 has 18(No) 16-bit registers. Each register bit probably requires 3 relays. That would total 864 relays just for the registers.

bread80,
@bread80@mstdn.social avatar

@f4grx I couldn’t find any in 5V but mouser lists them in 12V types.

When mixing relays and diodes you need to be careful of voltage drop over multiple diodes. Running at 12V gives more headroom here.

I’ll need to look at physical relay size before committing to a voltage.

thelastpsion, to random
@thelastpsion@bitbang.social avatar

Musing on #ctran.

I'm starting to wonder if there's any point in having the lexer and parser as two separate classes.

Other than testing, the lexer is only ever going to be called by the parser, and only once during the process.

It might be better to just have a lexer-parser class that grabs a file, tokenises it, then (if it's happy with the file it's tokenised) immediately turns it into a tree.

Is there a really good reason why they should be separate classes?

#compiler #objectpascal #oop

bread80,
@bread80@mstdn.social avatar

@thelastpsion @kroc Result is your friend. You can built a return value with it - such as appending substrings. Or you can assign a default return value but overwrite that with a different value if needed.

For something more akin to C’s return look at Exit() which is useful if you want to abort on a guard clause or save on nested conditionals.

And while we’re here, look up Continue and Break for loops.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • slotface
  • ngwrru68w68
  • everett
  • mdbf
  • modclub
  • rosin
  • khanakhh
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Youngstown
  • GTA5RPClips
  • InstantRegret
  • provamag3
  • kavyap
  • ethstaker
  • osvaldo12
  • normalnudes
  • tacticalgear
  • cisconetworking
  • cubers
  • Durango
  • Leos
  • anitta
  • tester
  • megavids
  • lostlight
  • All magazines