-
Posts
4,763 -
Joined
-
Last visited
-
Days Won
14
Asmusr last won the day on September 24 2022
Asmusr had the most liked content!
About Asmusr
- Birthday 07/21/1970
Profile Information
-
Gender
Male
-
Location
Denmark
Recent Profile Visitors
28,168 profile views
Asmusr's Achievements
River Patroller (8/9)
7.8k
Reputation
-
The link to download Magellan is very old. Please link to this instead: https://magellan.js99er.net/ and perhaps also to the source code https://github.com/Rasmus-M/magellan.
-
xdt99: New TI 99 cross-development tools available
Asmusr replied to ralphb's topic in TI-99/4A Development
VBScript, an exe file and a cmd file - I don't think it will be possible to download your zip let alone run the programs on most system today. 🙂 -
xdt99: New TI 99 cross-development tools available
Asmusr replied to ralphb's topic in TI-99/4A Development
A little GUI would actually be nice, when you don't care to think about command line options. WinAsm99 had many bugs, but the GUI made it appealing to beginners. -
Thanks, I forgot that HSYNC trigger doesn't set the PC to a specified address but just starts the GPU. So the whole question made little sense.
-
Thanks for your reply. I have a few changes to make in JS99er, and then I need to think about how to solve this in my current project, which is not as bad as it sounds since I just need TL1+TL2 at the top of the screen and then the remaining screen is covered by a BMP. So I can probably turn off TL2 while the screen is drawn. If there is ever going be an update to the firmware, maybe TILE2_PRI could be repurposed to be about TL2 priority over BMP, and the old purpose of TL2 vs sprite priority would always be considered? I don't think that would break any existing code that I'm aware of.
-
Sorry for spamming, but this reminded me of some speculations about the best way to make SAMS available in BASIC that I made a few years ago. My idea was that BASIC would make SAMS available as arrays, and it would internally maintain a list of allocated areas (i.e. a memory manager). To the user it would make these subroutines available: CALL AMSDIM(ARR,N) // Allocate an array in SAMS of size N. Return reference to array in ARR. Default data type is number. CALL AMSGET(ARR,I,VAL) // Read entry I of array ARR into variable VAL CALL AMSSET(ARR,I,VAL) // Set entry I of array ARR to value VAL CALL AMSFILL(ARR,I,L,VAL) // Fill L entries of array ARR from index I with value VAL CALL AMSCOPY(ARR1,I1,ARR2,I2,L) // Copy L entries from ARR1 index I1 to ARR2 index I2 CALL AMSFREE(ARR) // Deallocate array // Data types CALL AMSDIM(ARR,"N",N) // number (default) CALL AMSDIM(ARR,"S",N,M) // string (fixed length M) CALL AMSDIM(ARR,"B",N) // byte CALL AMSDIM(ARR,"W",N) // word // Same as above for 2-dimensional arrays CALL AMSDIM(ARR,N,M) // Also with data types CALL AMSGET(ARR,I,J,VAL) // Read entry I, J of array ARR into variable VAL CALL AMSSET(ARR,I,J,VAL) // Set entry I, J of array ARR to value VAL CALL AMSFILL(ARR,I,J,L,M,VAL) // Fill a 'rectangle' at (I,J) size (L,M) CALL AMSCOPY(ARR1,I1,J1,ARR2,I2,J2,L,M) // Copy a 'rectangle' between arrays Just an idea, it could be implemented in any version of BASIC. Edit: and there could also be subroutines for copying byte data directly from SAMS to VDP.
-
Another question: If the GPU is already executing when a HSYNC trigger occurs, is there any way to return to the code that was executing after the HSYNC routine?
-
@matthew180 regarding the F18A bitmap layer, VR31 has a bit BMPPRI which in the documentation (spreadsheet) is described as "Priority over sprites". However, it appears that this is really about priority over tiles - for TL1 at least - which is good because I want to be able to place a bitmap on top of the tiles. TL2, however, always appears to be displayed on top of the bitmap layer, also if VR51 TILE2_PRI is set to 1. Is there any way to display TL1 + TL2 and a bitmap on top?
-
It also depends on the overhead of switching SAMS pages. This could easily take up as many instructions as setting up a VDP address.
-
Nice tool, I haven't seen that before. But I don't know the answer to your question. If you just want to produce some sound effects for the built-in sound list player you could take a look at the Sound List Ripper.
-
That looks like something I could use. No arbitrary threshold for angular velocity. 🙂
-
Thanks for the replies. I also asked ChatGPT, and it came up with the Python code below. Basically, the only difference from what I have now is that when you're not speeding or braking it's multiplying the speed by a car_drift_factor, which I guess is the same as applying a friction. Note that in this model the angular velocity is constant (car_turn_speed), but I think it's correct that this should be a function of the speed, instead of increasing and decreasing when you steer as in the link I posted above. I will try to turn this into an XB program later, unless somebody beats me to it. Note that it will need to use CALL LOCATE to position the sprite instead of auto motion. I'm not sure if it will be fast enough, but then we can run it in Classic 99 with CPU overdrive. import pygame import math # Initialize Pygame pygame.init() # Constants WIDTH, HEIGHT = 800, 600 FPS = 60 # Colors WHITE = (255, 255, 255) RED = (255, 0, 0) # Car parameters car_speed = 5 car_turn_speed = 5 car_drift_factor = 0.9 # Initialize the screen screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Drifting Car Example") clock = pygame.time.Clock() class Car: def __init__(self, x, y): self.x = x self.y = y self.angle = 0 self.speed = 0 def update(self, throttle, brake, steer): # Update car angle based on steering self.angle += steer * car_turn_speed # Update car speed based on throttle and brake if throttle > 0: self.speed += throttle elif brake > 0: self.speed -= brake else: self.speed *= car_drift_factor # Update car position based on angle and speed radian_angle = math.radians(self.angle) self.x += self.speed * math.cos(radian_angle) self.y += self.speed * math.sin(radian_angle) def draw(self): pygame.draw.rect(screen, WHITE, (self.x, self.y, 20, 40)) # Create a car object car = Car(WIDTH // 2, HEIGHT // 2) # Game loop running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False keys = pygame.key.get_pressed() # Control the car throttle = keys[pygame.K_UP] * car_speed brake = keys[pygame.K_DOWN] * car_speed steer_left = keys[pygame.K_LEFT] steer_right = keys[pygame.K_RIGHT] steer = steer_right - steer_left # Update the car car.update(throttle, brake, steer) # Clear the screen screen.fill(RED) # Draw the car car.draw() # Update the display pygame.display.flip() # Cap the frame rate clock.tick(FPS) # Quit Pygame pygame.quit()
-
Right, but you're still only saying what you want the car to do, but not how to make it do it. What does it mean for the model that the car is skidding? There are no 'if' statements in the laws of Newton. 🙂
-
Does anyone know of a simple 2D physics model for a car that supports skidding/drifting, where the car is steered using turn left/turn right/speeder/brake? My first attempt was simply: Turn left: angle += turn_speed Turn right: angle += turn_speed Accelerate: speed += power Brake: speed -= power And then: velocity_x = speed * cos(angle) velocity_y = speed * sin(angle) position_x += velocity_x position_y += velocity_y This works OK, but you have to brake a lot before most turns, and it would be a more interesting gameplay to be able to brake a little to make the car drift and then speed up again. Also, being able to turn without the car moving is not very realistic. I looked at this https://gamedev.stackexchange.com/questions/1796/vehicle-physics-with-skid which introduces an angular velocity, but for me that either under or over steers the car, making it impossible to control.
-
Because there is only 32K left in the CPU's address space. Everything bigger than that requires page switching. And back in the days 32K was big.