enthusi Posted September 10, 2019 Share Posted September 10, 2019 RISC-V will be great again! Admittedly what I did for GBA was C already. But looping with gcc assembly output checks for seemingly critical parts. Quote Link to comment Share on other sites More sharing options...
42bs Posted September 10, 2019 Share Posted September 10, 2019 1 hour ago, enthusi said: RISC-V will be great again! RISC-V is no real competitor for ARM ISA, to "open", no guidance. Much confusion with the different layers. Sure a lot of academic and esp. the Chinese jump on it as it is free. IMHO, RISC-V will like go the Linux way: Hundreds of different version that share a minimum. Quote Link to comment Share on other sites More sharing options...
enthusi Posted September 10, 2019 Share Posted September 10, 2019 I just meant that in fact THE minimal RISC-V set is nice for manual assembly. But yes, there will be VERY many flags/extensions (which sort of is the point of RISC-V) but easy to manage in a compiler, annoying to consider for manual assembly. Quote Link to comment Share on other sites More sharing options...
Europatari Posted September 10, 2019 Author Share Posted September 10, 2019 okay, can we now get something straight guys? Quote Link to comment Share on other sites More sharing options...
VladR Posted September 10, 2019 Share Posted September 10, 2019 6 hours ago, karri said: Yep. Doing a new 3D engine is perhaps not the easiest way to familiarize yourself with a new architecture. Some simple 1 minute game in C or BLL would have been a good introduction to existing tools. It is also possible to get a fairly decent starting point by creating something in C and compiling it with --add-source to an asm file. There is also a lot of optimizers available like: -O Optimize code -Oi Optimize code, inline more code -Or Enable register variables -Os Inline some known functions -T Include source as comment --check-stack Generate stack overflow checks --disable-opt name Disable an optimization step --enable-opt name Enable an optimization step --register-space b Set space available for register variables --register-vars Enable register variables A simple compilation like cc65 -t lynx -O -T game.c -o game.s creates a nice asm source file that allows you to look in detail for how the cc65 planned to optimize the code. You can then use cl65 to compile the asm file and link the final executable. cl65 -t lynx -o game.lnx -C lynx.cfg game.s lynx.lib It was a calculated risk, though given how little time I was left with for an actual game (about 3 days), I cut it way too close for comfort I love --add-source, it's phenomenal being able to instantly see each line of C code translated. Gives you an instant view of what desperately needs to be rewritten in ASM. Not sure about the optimization switches. I was regularly running into code that didn't even compile into working one. Simple things like Array [X] += variable Thus, I wouldn't trust the optimizations. I rather rewrote most critical parts of the pipeline in ASM. Still, compared to what is available on Jaguar, CC65 is absolutely incredible. 1 Quote Link to comment Share on other sites More sharing options...
VladR Posted September 10, 2019 Share Posted September 10, 2019 5 hours ago, laoo said: I agree 100%. On 6502 there is just no sweet spot and you have to choose which resource to manage better - CPU time and memory usage, or... your life-time, and there is no such compiler that will "generate exact same code you would have written by hand". To be precise: I agree with your overall observation, but the TLDR part is a matter of personal decision and preferences what kind of game or games you want to produce. I have my paid job, writing games is my hobby and personally I spend on it as much time as I want (or actually how much my wife allows me to). Technically, my compiler isn't really a compiler, it's more of an Advanced Macro Expander But, it does create exact same code as written by hand, simply because I learnt the hard way that a marginally faster manual code is absolutely not worth the money it costs to produce and maintain in future. I get your point as a hobby, till recently, I could have spent a weekend on some stupid academic exercise (I used to not care if the code was throwaway), but now I view each page of code in terms of long-term refactorability, which was not a concern at all, when it was just aimless weekend hobby. 4 hours ago, enthusi said: This goes for any 80ies 6502-based game. They were all written in assembly by hand (with very few exceptions). You can reverse it and rewrite it and in C64-land that did and does happen in fact Except for compiled BASIC (horrible, horrible, horrible) you can read almost any routine in a disassembly rather well. Personally, I believe that you only want hand-written assembly in 6502/65C02. I actually don't want completely hand-written ASM. It's a waste of money for components that aren't critical to performance. Now, I'm not arguing the point that my compo game has very little gameplay inside (~3 days worth of coding). But, there's no freaking way I would have anything remotely playable if I didn't use CC65 and write all gameplay in C. From last year experience on Jaguar with this new language, I found out I need an environment that is very easy to quickly prototype in and very easy to return to. So, I want the same on Lynx. If I can sell 60-80 copies of Lynx game, that would cover my living costs (that I project to be about 6 months from now, once some credit card payments fall off) and I could actually spend 6-8 weeks of work on it. When you have the engine, tools, exporters and a tested workflow, you can do some really nice stuff in 6 weeks Now, that I experienced life outside of corporate environment, there's no bloody way I wanna go back to that absurd lifestyle Quote Link to comment Share on other sites More sharing options...
42bs Posted September 10, 2019 Share Posted September 10, 2019 1 hour ago, Europatari said: okay, can we now get something straight guys? Nope, just hijacking you thread ? 3 Quote Link to comment Share on other sites More sharing options...
enthusi Posted September 10, 2019 Share Posted September 10, 2019 Most smartphones use ARM CPUs. Reversing ARM is very close to this topic In fact I reversed a few GBA routines/engines this way. Well, not a fully engine, but parts of it. Quote Link to comment Share on other sites More sharing options...
Europatari Posted September 11, 2019 Author Share Posted September 11, 2019 and also, i said, that it could be possible with the class files to reprogramm the java game to a gba game, not only lynx Quote Link to comment Share on other sites More sharing options...
42bs Posted September 11, 2019 Share Posted September 11, 2019 26 minutes ago, Europatari said: and also, i said, that it could be possible with the class files to reprogramm the java game to a gba game, not only lynx It should be clear by now, that you can't "reprogram" a Java game. You can get inspired by the GFX and sounds and maybe check the logic. But using the (de-compiled) Sources directly is impractical not to say useless. Quote Link to comment Share on other sites More sharing options...
Europatari Posted September 11, 2019 Author Share Posted September 11, 2019 okay, i am just upset, that mercury meltdown or luxor cannot be ported to the Atari lynx Quote Link to comment Share on other sites More sharing options...
42bs Posted September 11, 2019 Share Posted September 11, 2019 1 minute ago, Europatari said: okay, i am just upset, that mercury meltdown or luxor cannot be ported to the Atari lynx I do not know these, but they can be ported. But not by just taking the .jar file. As Karri noted, you cannot just grab some GFX and scale it down to the Lynx rez. Quote Link to comment Share on other sites More sharing options...
Europatari Posted September 11, 2019 Author Share Posted September 11, 2019 yeah, but someone found out, that there is a JVM for the Atari lynx handheld Quote Link to comment Share on other sites More sharing options...
enthusi Posted September 11, 2019 Share Posted September 11, 2019 A bit more seriously. The only way you can make use of Java sources is to learn more easily about game mechanics. Back in the days, when arcade games were ported to home computers, the teams usually only had a machine in their office, no sources or whatever. Sometimes just video footage of the game being played even! So Java or whatever sources would help alot to get (non trivial) dependencies right. You might even try to convert some of the original art or at least use it as basis. But when coding for any 8bit plattform you will always want to work close to the hardware. This means assembler or maybe C with hardware critical parts in assembler (libraries). Decisions by the developer for a smartphone plattform will differ ENORMEOUSLY from what is required on a 64K RAM system. 1 1 Quote Link to comment Share on other sites More sharing options...
42bs Posted September 11, 2019 Share Posted September 11, 2019 (edited) 13 minutes ago, enthusi said: A bit more seriously. The only way you can make use of Java sources is to learn more easily about game mechanics. Back in the days, when arcade games were ported to home computers, the teams usually only had a machine in their office, no sources or whatever. Sometimes just video footage of the game being played even! So Java or whatever sources would help alot to get (non trivial) dependencies right. You might even try to convert some of the original art or at least use it as basis. But when coding for any 8bit plattform you will always want to work close to the hardware. This means assembler or maybe C with hardware critical parts in assembler (libraries). Decisions by the developer for a smartphone plattform will differ ENORMEOUSLY from what is required on a 64K RAM system. Good reading closely related to "porting a game": http://bizzley.com/ (=> download) Edited September 11, 2019 by 42bs 1 Quote Link to comment Share on other sites More sharing options...
enthusi Posted September 11, 2019 Share Posted September 11, 2019 (edited) Yes, I have that one printed and read Good call! Edited September 11, 2019 by enthusi Quote Link to comment Share on other sites More sharing options...
Igor Posted September 12, 2019 Share Posted September 12, 2019 15 hours ago, 42bs said: I do not know these, but they can be ported. But not by just taking the .jar file. As Karri noted, you cannot just grab some GFX and scale it down to the Lynx rez. I was able to recover this super secret Crysis prototype for Atari Lynx, so does Lynx run Crysis? Maybe! ? 1 2 Quote Link to comment Share on other sites More sharing options...
+karri Posted September 12, 2019 Share Posted September 12, 2019 14 hours ago, 42bs said: Good reading closely related to "porting a game": http://bizzley.com/ (=> download) Thanks for sharing! I just started on the intro and the text feels so good. Quote Link to comment Share on other sites More sharing options...
42bs Posted September 12, 2019 Share Posted September 12, 2019 (edited) 4 hours ago, necrocia said: I was able to recover this super secret Crysis prototype for Atari Lynx, so does Lynx run Crysis? Maybe! ? Ah, Lynx III with high-color display. On Lynx II it would look like this: Not that bad. Edited September 12, 2019 by 42bs 3 Quote Link to comment Share on other sites More sharing options...
solo/ng Posted September 12, 2019 Share Posted September 12, 2019 On 9/9/2019 at 11:37 PM, VladR said: Performance-wise, my compiler will generate exact same code you would have written by hand, so performance is not affected in the least. I 100% disagree here. Quote Link to comment Share on other sites More sharing options...
solo/ng Posted September 12, 2019 Share Posted September 12, 2019 And if so - why we didnt see it on the Lynx game of yours? In game all I see is few simple polygons, without rotations or anything. 1 Quote Link to comment Share on other sites More sharing options...
VladR Posted September 12, 2019 Share Posted September 12, 2019 2 minutes ago, solo/ng said: I 100% disagree here. You sure can, except my Jaguar compiler has been doing this for last year, for both 68000 and RISC targets. Things like looping, math expressions, conditions - those all have pre-determined set of instructions that the compiler merely replaces within the source code. Some features are more complex than others to implement, yes. Conditions are more complex, as at the moment you find the "if" keyword you don't know yet if there is an accompanying "else" branch (or how deep it goes). Hence, you must be able to handle all scenarios, which gets messy with the labels. But, other than conditions, everything else is straight replacement. How is that exactly impossible ? Quote Link to comment Share on other sites More sharing options...
VladR Posted September 12, 2019 Share Posted September 12, 2019 Just now, solo/ng said: And if so - why we didnt see it on the Lynx game of yours? In game all I see is few simple polygons, without rotations or anything. Oh, you haven't read this thread even, as I mentioned it already. On Lynx, I don't have this compiler implemented yet - but as it will save me a lot of effort in future, I soon will. Why on earth would I want to rotate the polygons there ?!? Makes no sense to me why to waste performance on that. Quote Link to comment Share on other sites More sharing options...
solo/ng Posted September 12, 2019 Share Posted September 12, 2019 The rotation was just an example. You showed us cool looking screenshots (the word screenshot is important here) and I was actually excited to see what you submit. Then I saw a super simple "road" that can be done even without any 3D calculations at all. On a stock A800. Where is the stuff!; ) Back in the days we had a realtime 3D engine on A800 (that could render for example 128 triangles tourus with backface culling and lightsourcing - in ~15 frames). All realtime, no precalc. So I know "a little" how stuff like this can or cant be done on 6502. So the phrase "Performance-wise, my compiler will generate exact same code you would have written by hand" is just wrong and please dont say stuff like that because is false. It triggered me;). Will wait for the finished compiler then!. Quote Link to comment Share on other sites More sharing options...
enthusi Posted September 12, 2019 Share Posted September 12, 2019 I could not resist It's an actual emulator screenshot (while playing Assembloids music, etc :) 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.